ARLINGTON, Texas (AP) — Nomar Mazara and Joey Gallo hit impressive home runs in the same inning, and the Texas Rangers avoided a series sweep with a 7-4 win over the Seattle Mariners on Sunday.

Mazara pulled a shot into the right-center seats beyond the Rangers bullpen in the fourth, a drive that would have been 441 feet unimpeded. Adrian Beltre walked. Gallo's opposite-field popup that carried into the Seattle bullpen for his seventh homer and a 4-0 lead over Erasmo Ramirez (0-1), who was making his season debut.

Martin Perez (2-2) gave up seven hits, walked a batter and hit another one in six innings before leaving with a 5-2 lead. The Texas lefty, who has given up 36 hits and eight walks in 18 1/3 innings this season, lowered his ERA from 13.14 to 9.82.

Keone Kela worked a scoreless ninth for his third save. He allowed consecutive hits starting the inning, but the game ended when shortstop Jurickson Profar made a tough catch of a popup in shallow left field.

Mitch Haniger homered in all three games of the series. His two-run shot in the seventh off Matt Bush got the Mariners to 5-4 before they loaded the bases against the second reliever in the inning. Jake Diekman had a throwing error and a walk, then struck out David Freitas and pinch-hitter Mike Zunino to end the threat.

That came an inning after Rangers center fielder Delino DeShields, activated from the disabled list for his first game since March 30, had a homer-robbing catch of a Frietas drive. DeShields had surgery three weeks ago to remove a broken hamate bone from his left hand.

Ramirez, who didn't appear in a spring training game and started the season on the disabled list because of a strained right lat, allowed five runs and five hits in 4 2/3 innings.

To make room on the 25-man roster for Ramirez, the Mariners optioned Guillermo Heredia, one of their five outfielders, to Triple-A Tacoma. Ichiro Suzuki, the 44-year-old outfielder who stayed, had two infield singles and walked twice.

TRAINER'S ROOM

Mariners: CF Dee Gordon, the MLB stolen base leader, was out of the starting lineup on his 30th birthday to rest a sore foot. He pinch hit in the ninth, and had the game-ending popout.

Rangers: Carlos Tocci, who had started eight games in CF, was placed on the 10-day DL with a bruised left hip. Tocci banged against the wall in Tampa Bay trying to make a catch last Monday. ... RHP Doug Fister (right hip strain) threw 40 pitches in a bullpen session and is on track to come off the DL to start Wednesday against Oakland.

UP NEXT

Mariners: Seattle plays the fourth game of its 10-game trip. Mike Leake (2-1) starts the series opener at the Chicago White Sox.

Rangers: Matt Moore (1-3), the lefty who has allowed only three earned runs over 12 innings his last two games, starts the opener of a three-game home series against Oakland.

___

More AP baseball: https://apnews.com/tag/MLBbaseball