Updated

During the course of a game that lasted nearly five hours, Seattle Mariners manager Eric Wedge watched his team jump out to a five-run lead, blow that cushion and then battle the Baltimore Orioles deep into the night.

About the only thing Wedge did not see was the end of the game.

Wedge was ejected in the 14th inning for arguing a pivotal call in Seattle's 8-7 loss Tuesday night. Long after the winning run crossed the plate, he was still fuming.

Omar Quintanilla led off the 14th against Shawn Kelley (2-3) by hitting a grounder to second baseman Dustin Ackley, who made a great stop before throwing to first baseman Mike Carp. Umpire Brian Knight ruled Carp took his foot off the bag while stretching for the throw, and Wedge was tossed from the game for vociferously protesting the call.

"He was out," Wedge said. "He didn't even come close to coming off the bag. It was evident that he was on there, and noticeably so, and it's just a shame that he has to make that call right there and cost us the ballgame."

Nick Markakis followed with a single, J.J. Hardy sacrificed and an intentional walk loaded the bases. Adam Jones then hit an opposite-field liner to right that glanced off the glove of Casper Wells, allowing Quintanilla to score.

"This is the big leagues. A game shouldn't end like that when you're in the 14th inning, our guys are fighting their (tails) off out there to compete and win. For an umpire to get involved in that is just ridiculous."

Carp added: "I've got nothing to say that's worth saying. You guys saw it, the whole world saw it. I hope someone has the decency to say something about it."

Kyle Seager and Miguel Olivo homered for the Mariners, who have lost four of five following a seven-game winning streak. Seattle finished with 18 hits but did not score after the sixth inning.

The Mariners led 7-2 in the sixth but fell into a tie when Lucas Luetge gave up a three-run homer to Hardy in the seventh.

"You know what? He hadn't given up a home run all year long," Wedge said. "He's been one of our most reliable relievers."

It was the 12th straight win in extra innings for the Orioles, who have played five games of at least 13 innings and won them all.

"You know, it's not a team that's sitting there going, 'Woe is me. Let's get this over.' They grind it," manager Buck Showalter said. "They put in so much effort."

Matt Wieters homered twice, Hardy contributed a three-run drive and Markakis had four hits for the Orioles.

Darren O'Day (6-0), the seventh Baltimore pitcher, worked two innings.

It was the fourth straight victory for the Orioles, who moved eight games over .500 (59-51) for the first time since June 29. Baltimore has won 11 straight one-run games and is 23-6 in games decided by one run.

Wieters launched Baltimore's comeback with his second homer of the night, a sixth-inning drive that made it 7-3.

Mark Reynolds chased starter Blake Beavan in the seventh with a leadoff double, and Luetge promptly gave up an RBI single to Quintanilla. Markakis followed with an infield hit before Hardy sent an 0-1 pitch into the left-field seats to erase a lead the Mariners held from the top of the first.

That ruined Beavan's bid to win a fifth straight start, a streak that began with his recall from Triple-A Tacoma on July 17.

Orioles starter Zach Britton gave up seven runs, four earned, and eight hits in five-plus innings. Despite the poor pitching line, the left-hander lowered his ERA to 8.10.

The Mariners jumped in front with three unearned runs in the first. After Britton fumbled a dribbler by Ackley, Jesus Montero was credited with a two-out hit when Wilson Betemit couldn't handle his hard grounder to third. Seager followed with his team-high 12th home run, the first in 19 games since July 18.

Seattle made it 5-0 in the second. After Olivo hit a solo homer, three straight singles — the last by Trayvon Robinson — produced another run.

In the bottom half, Wieters homered on a 3-2 pitch and Markakis added a two-out RBI single.

The Mariners went up 7-2 in the sixth when Wells tripled and scored on a single by Carp, who came home on a single by Ackley.

NOTES: After the game, the Orioles optioned Britton to Triple-A Norfolk and recalled RHP Steve Johnson, who will start Wednesday night. Former Orioles right-hander Kevin Millwood will pitch for Seattle. ... Seager leads the majors with 39 two-out RBIs. ... It was Wieters' third career multihomer game, the second this season. ... Seattle's Michael Saunders went 0 for 7 with four strikeouts.