David DeJesus delivered an RBI single in the 18th inning to give the Rays a 5-4 win over the Orioles in a game that ended after 2 a.m. local time and set an MLB record for number of pitchers used.
Desmond Jennings' one-out double in the 18th was the first extra-base hit by either team since the top of the seventh. He eventually came around to score on DeJesus' line drive to right-center field, ending the 6-hour, 54-minute game -- the longest in Rays and Orioles history.
The teams combined to use an MLB-record 21 pitchers and Jeremy Hellickson, the Rays' scheduled starter for Sunday, got the win in 2 1/3 innings as Tampa Bay remained atop the AL wild card standings.
How strange did things get? After the winning run scored at 2:05 a.m. -- the latest a game has ever ended at Tropicana Field -- two Rays players celebrated in masks: one as Chewbacca from "Star Wars" and the other as Gene Simmons from the rock band Kiss.
The game started at 7:10 p.m. Friday.
The teams are scheduled to play the second game of the four-game series at 1:05 p.m. ET Saturday.
Hellickson (12-9) only allowed one hit. Bud Norris (10-12) took the loss in 2 1/3 innings for the Orioles.
The teams combined for only five more hits, 26, than pitchers used and only one player had more than three -- the hero DeJesus, who had four in eight at- bats.
The Rays have sole possession of the first wild card spot, percentage points ahead of Cleveland, which beat Houston in seven innings Friday after rain ended that game early.
Rays starter David Price went five-plus innings, giving up two runs and nine hits. Jason Hammel pitched five innings for the Orioles and gave up three runs -- two earned -- on six hits.
Hours after they came out, the teams struggled to build rallies in extra innings.
Neither team had a runner in extra innings until Chris Davis walked with one out for the Orioles in the 12th. Nick Markakis singled in the 13th for the Orioles but was stranded at second base.
The Rays got their first runner in extra innings when Jennings drew a two-out walk in the 14th. Yunel Escobar also walked but DeJesus struck out to end the inning.
Ben Zobrist reached on a soft bunt inside the third base line to lead off the bottom of the 15th and the Rays eventually loaded the bases.
Zobrist was out at second on Evan Longoria's ground ball to short, but Longoria was safe at first when Davis came off the bag on the throw. The Orioles missed another chance for a double play on Wil Myers' grounder to second, though Longoria was forced out.
Jose Lobaton singled, moving Myers to third, and pinch-hitter Chris Gimenez walked to load the bases, but Tim Beckham grounded out to end the inning.
Zobrist made two impressive defensive plays from second base in the ninth inning to potentially save a run.
He tracked to his left and dove to stop Manny Machado's grounder for the first out. Then, with Davis at second after a walk and a steal, Zobrist backhanded Danny Valencia's ball up the middle, throwing him out to end the inning.
Jennings was at second base in the bottom of the ninth when Zobrist hit a hard line drive at reliever Tommy Hunter, who stayed with it for the third out.
The Orioles trailed 3-0 after two innings but took the lead after seven.
In the seventh, Adam Jones hit an RBI double to the left-field wall and Valencia drove in a run with a sac fly to give the Orioles a 4-3 lead.
The Rays tied it against Kevin Gausman in the bottom of the seventh after Escobar hit a leadoff single, went to second on a wild pitch and scored on Zobrist's single.
Earlier, the Rays knocked Hammel around for three runs in the first two innings. Zobrist had an RBI double in the first and scored later on an error and DeJesus knocked in a run on a sac fly in the second to make it 3-0 Rays.
The Orioles scored their first run after loading the bases in the fifth when Jones' chopper to the left side took a weird hop and Longoria was unable to handle it. The ball probably would have bounced foul if Longoria hadn't tried to field it.
Matt Wieters doubled to lead off the sixth and scored after back-to-back groundouts by J.J. Hardy and Nick Markakis to get the Orioles within 3-2.
The previous longest game in Rays history was 5 hours, 44 minutes, a 16-inning loss to Boston on July 17, 2011. That was the latest a game had gone at Tropicana Field before Friday, ending at 1:54 a.m. ... The Rays' longest game this season in terms of innings prior to Friday was a 14-inning loss to the Red Sox on June 10. The Orioles also had a 14-inning loss, at Arizona on Aug. 14 ... Hammel hasn't earned a win since May 27 ... Fans in attendance receive free pizza because Rays pitchers struck out 10. The 10th strikeout came in the 18th inning, not long before 2 a.m.