Murphy was the last player to enter the game, coming in as a pinch runner for Brian McCann, who had doubled to lead off the 18th after Pablo Sandoval’s run-scoring single had given the Red Sox a 5-4 lead. Murphy scored on Carlos Beltran’s RBI double.

Earlier, in the 16th inning, the Red Sox had taken a lead on David Ortiz’s solo home run before Teixeira tied it with a solo blast of his own, off Steven Wright, a knuckleball pitcher. The home run, down the left-field line, conjured up memories of a famous Yankee home run off another Red Sox knuckleballer: Aaron Boone’s pennant-winning blast off Tim Wakefield in 2003.

“Once you come back and tie it, you feel like you’ll push through and win it, especially as the home team — you feel like you’ve got an advantage,” Gardner said. “But we were never able to come up with the big hit to win it. We had some big moments to come back and tie it. Chase and Tex — I don’t remember the rest.”

Headley had a difficult night, getting picked off first base and popping up in the seventh inning with the tying run at third. It had been a difficult start to the season for Headley, who signed a four-year, $52 million contract to remain with the Yankees. When he came to the plate in the ninth, Headley had just two hits in 14 at-bats to start the season.

He drove a 2-1 pitch from Red Sox closer Edward Mujica over the right-field wall.

“It’s such a rush of emotion when it happens, and then five innings later I was searching for some more, and it was tough,” said Headley, whose home run was his only hit in seven at-bats. “You’re just wanting somebody to get it done, even when you’re up there you want to get it done. You’re pulling for your guys. We just couldn’t get that extra one. We’d get that one but, we couldn’t get the other one.”