NEW YORK -- The first game of the season between the Red Sox and Yankees was one to remember -- for anyone still awake at the end.
In the latest classic matchup of their long and illustrious rivalry, Boston finally outlasted New York 6-5 in 19 innings early Saturday when the game-ending double play was turned at 2:13 a.m.
After squandering leads in the ninth, 16th and 18th, Boston at last went ahead for good on a sacrifice fly by Mookie Betts. Xander Bogaerts scored the decisive run after reaching on his fourth hit in extra innings.
"It's a testament to the will and the resiliency of this team," Red Sox manager John Farrell said.
Chase Headley and Mark Teixeira, who turned 35 when the clock struck midnight, hit tying home runs for the Yankees during an early-season epic delayed 16 minutes by a power outage in the 12th. That's why the official time of game was 6 hours, 49 minutes -- even though it took more than 7 hours to complete.
The teams combined for 138 at-bats, 32 hits, 28 strikeouts and 627 pitches thrown by 17 pitchers, according to ESPN's Stats and Information.
After the first of 19 meetings this year, the teams get little chance to rest. They're back at it for the middle game of the series Saturday at 1:05 p.m.
"It's one game that seemed like about six, and we'll move on," Yankees manager Joe Girardi said.
David Ortiz hit a solo homer for Boston to break a 3-all deadlock in the 16th. But then Teixeira, batting from the right side against right-handed knuckleballer Steven Wright, led off the bottom half with a no-doubt drive to left field.
And on it went before a few thousand scattered fans left from the crowd of 41,292.
Each club went to its last reliever in the 15th during the longest game by time in Red Sox history -- and second-longest for the Yankees. They had a 22-inning victory at Detroit that took 7 hours in 1962.
It was the longest game by innings for New York since a 19-inning win over Minnesota in August 1976.
"It was just a wonderful game. I wish we would have won, but it was a great game," Headley said.
The longest game by innings between the old rivals was a 20-inning victory for New York in the second game of a 1967 doubleheader.
Headley's solo shot off fill-in closer Edward Mujica came with two outs in the bottom of the ninth. Neither team could break through again until Ortiz launched an 0-2 pitch from Esmil Rogers (0-1) to right-center.
Didi Gregorius had a chance to win it for New York in the 16th and 18th, but grounded out with a runner at third to end both innings.
Boston got five innings of relief from Wright (1-0) in a game that featured 17 pitchers who combined to throw 628 pitches.
"I looked around the bullpen and I was the only one left. That's my role and I like that role," Wright said.
The Red Sox stranded 20 runners, but came through one last time in the 19th.
Bogaerts singled, stole second and went to third on a passed ball by backup catcher John Ryan Murphy, who had just replaced McCann. Betts delivered a sac fly to center.
It appeared New York might rally yet again in the bottom half when Jacoby Ellsbury led off with a single. Brett Gardner flied out, and Garrett Jones hit a low liner toward the middle. Bogaerts short-hopped the ball at shortstop and flipped to second, where Dustin Pedroia leaped in the air for an athletic relay to first.
"Unbelievable," Wright said. "That's a heck of a play, to be able to pull that off at 2:30 in the morning. It's spectacular."
Girardi said Jones, a first baseman and DH who came off the bench in the 11th for his Yankees debut, would have pitched the 20th.
Rogers, who threw 81 pitches after making 35 the previous night, said he would have pushed to stay in the game.
"It feels worse than one loss, but thank goodness it's only one," Gardner said.
The lights dimmed as Boston reliever Tommy Layne threw the first pitch in the bottom of the 12th to Beltran. Fans groaned and umpires huddled with both managers before going underneath the stands to get information.
It appeared nine or 10 banks of lights went out, many of them behind home plate. After both teams left the field to boos, the lights came back on and play resumed.
The Yankees said they believe there was a power surge throughout the building. The team turned on additional light banks that are normally off above the foul poles as electricians rebooted the bulbs that went dark.
One of several newcomers to an old rivalry, Sandoval also had an RBI single for the Red Sox his first time up. And for the first time in two decades, Derek Jeter wasn't a member of the Yankees when they took on Boston.
"The game doesn't wait for anyone," Farrell said beforehand. "We're looking forward to the next chapter."
SEEN THAT BEFORE
It was Ortiz's first home run of the year and his 50th against the Yankees, including playoff games.
BACK IN THE SADDLE
Alex Rodriguez batted third for New York. He hit an RBI single and a double, and struck out three times.
Red Sox: Boston closer Koji Uehara (strained left hamstring) is slated to pitch an inning for Class A Greenville in a rehab assignment Saturday night.
Yankees: McCann was shaken up in the ninth when a foul ball hit the top of his right kneecap, but he remained in the game for another nine innings.
Red Sox: RHP Joe Kelly (strained biceps) will come off the DL to start Saturday afternoon.
Yankees: RHP Adam Warren, primarily a reliever the last two seasons, is scheduled to make his fourth major league start after winning the final rotation spot during spring training. Warren was exclusively a starter in the minors.
Information from The Associated Press was used in this report.
MLB during COVID-19: Behind the scenes with the New York Yankees through Adam Ottavino's lens
Reliever Adam Ottavino photographed one of the most surreal seasons in MLB history. He shared some of his favorite images -- and the stories they tell.
Could Theo Epstein help MLB fix its pace-of-play problem?
The former Cubs and Red Sox honcho has the creativity to help baseball again be a game with more than strikeouts and home runs.
Dan Marowski, official scorer for Detroit Tigers, dies at 65
Dan Marowski, who worked for over a decade as an official scorer, mostly for the Detroit Tigers, has died. He was 65.
Tampa Bay Rays designate outfielder Hunter Renfroe to clear roster room
The Tampa Bay Rays have designated outfielder Hunter Renfroe for assignment.
New York Mets sign 6-foot-7 pitcher Sam McWilliams to 1-year deal
Sam McWilliams, a 6-foot-7 right-hander who is 30-35 with a 3.85 ERA in a minor league career that has spanned six years with three other organizations, has signed with the Mets.
Boston Red Sox tab Will Venable as bench coach in Alex Cora's return
The Red Sox have hired Will Venable, who spent the past three seasons as a Cubs base coach, to be a bench coach on manager Alex Cora's staff.