SEATTLE -- Taylor Teagarden stroked a pinch-hit RBI single to right in the 18th inning to help give the Baltimore Orioles a 4-2 comeback victory over the Seattle Mariners on Tuesday night.
The game lasted for five hours and 44 minutes, getting over just before 1:00 a.m. It was the longest extra-inning game for the Mariners this season. They are 5-8 in extra innings.
It's the first time the Orioles have been 20 games over .500 since the last day of the 1997 season.
The Orioles are 14-2 in extra-inning games and 9-0 in them on the road. They beat Boston 9-6 in 17 innings on May 6.
The win allowed the Orioles (84-64) to pull within a percentage point of the Yankees (83-63) for the lead in the AL East. The Yankees were rained out Tuesday and will play a split double-header with Toronto on Wednesday.
Baltimore maintained a three-game lead over the Los Angeles Angels for the wild-card spot. The Angels beat Texas in Anaheim Tuesday, 11-3.
Nate McLouth opened the 18th with a walk off Lucas Luetge (2-2). With McLouth breaking toward second, J.J. Hardy sent a single through the right-side hole. McLouth continued onto third.
Teagarden then lifted his game-winner down the right-field line. Hardy later scored on Mark Reynolds' fielder's choice.
Tommy Hunter (5-8) picked up the victory in a game that lasted 5 hours, 44 minutes.
Jim Johnson worked the 18th to pick up his 44th save -- most in the majors -- in 47 opportunities.
The Orioles rallied in the ninth off starter Erasmo Ramirez, who had allowed just two hits and was sitting on a 2-0 lead entering the inning. Pinch-hitter Ryan Flaherty and McLouth opened with singles to bring in closer Tom Wilhelmsen.
Hardy dropped a sacrifice bunt to advance the runners. Chris Davis followed with a two-run single to right.
Wei-Yin Chen went 5 1-3 innings, allowing two runs on six hits. He walked two and struck out two. McLouth had three hits for the Orioles.
Justin Smoak and Dustin Ackley each had three hits for the Mariners.
It appeared that Chen would breeze through the fourth as the first two batters bounced out to the infield. Casper Wells then drew a walk on a 3-2 pitch. Miguel Olivo followed with his 11th home run on a 1-2 curve from Chen, who had started him with four straight fastballs.
Ramirez retired the first nine batters before McLouth's leadoff single in the fourth, just tipping off the glove of second baseman Ackley. He then retired the next eight straight before McLouth's double to center in the sixth. Center-fielder Franklin Gutierrez caught the ball on a dive but it popped out of his glove on contact with the ground.
Ramirez, recalled from the minors on Sept. 1, matched his career high with eight innings. He allowed four hits and both runs were charged to him. He struck out six and walked no one.
NOTES: DH Jim Thome (neck) and LHP Troy Patton (ankle) are finishing rehab assignments at the Orioles' Sarasota facility and could rejoin the club this weekend in Boston. "They're both close," manager Buck Showalter said. "We'll make the call (Thursday)." ... RH Miguel Gonzales and RH Chris Tillman will start in Boston with the third starter to be decided. ... Chen is just the fourth Orioles rookie pitcher since 1954 to make at least 30 starts. He joins Bob Milacki (36 in 1989), Tom Phoebus (33 in 1967) and Brian Matusz (32 in 2010). ... Felix Hernandez was recognized before the game as the Mariners' nominee for the Roberto Clemente Award. "That's a great honor," manager Eric Wedge said. "Felix is the total package. To see what he does off the field, how he carries himself, how generous he is with his time, with people, it's well-deserved." ... RHP Hector Noesi, shelled for six runs and eight hits in 1 1-3 innings Monday, is back in the bullpen for the rest of the season. RH Blake Beavan will fill his spot in the rotation, starting Saturday. ... Michael Saunders was ejected in the 10th inning for disputing a called third strike.