BALTIMORE (AP)Cedric Mullins doubled in the winning run in the 10th inning, and the Baltimore Orioles beat the Texas Rangers 10-9 Tuesday night in a wild game that featured several comebacks and clutch home runs.

Mullins hit a two-out liner into the gap off Matt Moore (3-2) to bring home Ryan McKenna, who started the inning at second base.

Joey Krehbiel (4-3) worked out of a bases-loaded jam in the top of the 10th for the Orioles, who have won three straight following a four-game skid.

This one was particularly enjoyable, even if they couldn’t shake the Rangers until the game’s final play. The Orioles became the first team in major league history to allow a game-tying or go-ahead homer in the seventh, eighth and ninth innings and still win the game, according to Stats.

”That’s a great feeling, to be in the fight all night and to come out on top,” Mullins said. ”We had a lot of chances to end it early, but it’s huge for our pitching staff to know they have guys they can count on if they don’t come out strong.”

Texas trailed 4-0 in the second inning, 7-4 in the eighth and 8-7 in the ninth before rallying. Not to be outdone, Baltimore pulled out of a 9-8 deficit in the ninth when Rougned Odor hit a two-out, solo shot to right-center off Joe Barlow.

Mitch Garver, Nathaniel Lowe and Corey Seagar homered for the Rangers, who have connected in 11 straight games, tying their longest run of the season.

”We fought. We had some big hits there at the end,” manager Chris Woodward said.

But poor pitching from a weary relief staff was too much to overcome.

”We were pretty thin in the bullpen. Some of those guys we wanted to stay away from came in and pitched and gave it everything they had,” Woodward said. ”The pitches we gave up got too much of the plate.”

After Lowe hit a three-run drive to pull the Rangers into a 7-7 tie in the eighth, McKenna opened the bottom half with his first home run of the season, off John King. McKenna thrust his arm in the air after the ball landed in the front row of seats beyond a left-field wall that was moved back and raised before the season.

But the advantage lasted only briefly. Felix Bautista gave up a one-out single before Seager homered to give the Rangers their first lead.

Baltimore went up 4-0 in the second inning against right-hander Spencer Howard. After Jorge Mateo hit a two-out RBI single, Mullins doubled in two runs and Trey Mancini doubled into the left-field corner.

Called up from Triple-A Round Rock to make his second career start, Howard gave up four runs and six hits over four innings.

”He did OK,” Woodward said. ”Obviously that second inning kind of got away from him.”

After Texas loaded the bases in the fifth inning against starter Austin Voth, Keegan Akin gave up a sacrifice fly to Josh Smith. Marcus Semien then bounced a run-scoring single off third base and Seager lined an RBI single to center.

Garver led off the seventh with a homer off Akin to make 4-all. He became the seventh Rangers player on the team to reach double figures in home runs.

GREAT EXPECTATIONS

The Rangers (37-42) haven’t been at .500 since the end of May and are assured of having a losing record at the 81-game midpoint. Two stats stand out: Texas is 13-37 when scoring five runs or less and 4-16 in one-run games. ”The guys are playing hard. They’re fighting, they’re grinding,” Woodward said. ”They’re really frustrated in that locker room.”

TRAINER’S ROOM

Orioles: OF Austin Hays was not in the starting lineup because his right wrist was still sore after being hit by a pitch Monday. … 1B Ryan Mountcastle did not start because of a ”sinus issue,” according to manager Brandon Hyde. … RHP Kyle Bradish (shoulder inflammation) will pitch in a simulated game ”in the next couple of days,” Hyde said.

UP NEXT

Rangers: RHP Glenn Otto (4-4, 5.63 ERA) starts the series finale Wednesday night. He’s 0-2 with a 15.00 ERA in two starts since coming off the COVID-19 list.

Orioles: RHP Spenser Watkins (1-1, 4.61) makes his first career appearance against Texas. It will be Watkins’ 11th start of the season and sixth at home, where he’s 0-0 with a 5.51 ERA.

More AP MLB: https://apnews.com/MLB and https://twitter.com/AP-Sports