NEW YORK -- The desperation level had reached its peak, and the Red Sox came harrowingly close to leaving Yankee Stadium in a tie with the Rays atop the American League Wild Card standings.
But Jacoby Ellsbury, who is having a monster season -- perhaps one worthy of the AL Most Valuable Player Award -- wouldn't let it happen.
And neither would Jonathan Papelbon, another player who has come through in the clutch nearly all season.
A game that took five hours and 11 minutes ended with the Red Sox digging deep and finding a way to beat the Yankees, 7-4, in 14 innings.
It was some way to cap Sunday's day-night doubleheader.
The triumph was easily the biggest of the season for the Red Sox, as they can now go to Baltimore still in control of their own destiny, ahead of Tampa Bay by a game with three to play.
It was Ellsbury who broke the 4-4 stalemate that had existed since the bottom of the seventh, pummeling a three-run homer to right with two outs in the top of the 14th.
"I don't care who hit it, but that seemed kind of fitting," said Red sox manager Terry Francona. "He's a pretty extraordinary player."
The manager would say the same thing about Papelbon, who fired 2 1/3 flawless innings, retiring all seven batters he faced, including four on strikeouts.
"I was running out a little bit of gas," Papelbon said. "But I think tonight was just one of those games that you willed your way through. That's it. That's all we had to do."
For the month, Boston is 6-18. If the Sox are successful in punching their ticket to the postseason during their three-game series at Camden Yards, they can avoid the indignity of being the first team to blow a 10-game lead in the Wild Card standings since the advent of that format in 1994.
"This was a huge win," said Ellsbury, who also belted two homers in the Game 1 loss. "It allows us to control our own destiny. We know if we win out, we're in. So we don't have to scoreboard watch or anything like that. It was definitely a huge win for us."
Of Papelbon's 29 pitches, 22 were for strikes. Pressure? Bring it on, said the closer, who hasn't had many chances of late amid a stretch when the Red Sox have perpetually been trailing.
"Time to grind and shine," Papelbon said. "If you don't like this, you don't have blood going through your veins. Right? If you don't like this, if you're not going to play tired, if you're not going to play hurt, and you're in this clubhouse, you ain't got blood running through your veins. Hopefully we're back here in a couple weeks. That's where we're trying to go."
While Papelbon and Ellsbury corralled center stage, there were some performances that shouldn't be forgotten.
Franklin Morales fired two shutout innings that required 44 pitches, not to mention escaping from a bases-loaded jam in the 13th. It was Morales who earned the win.
"Franklin was phenomenal," said Papelbon. "I think that's what you call tonight's win -- a top-to-bottom win. That's what it was. Everybody contributed tonight, from top to bottom. Now we've got to go ball in Baltimore. That's what we've got to do."
Second baseman Dustin Pedroia made a tremendous defensive play in the bottom of the 13th, making a diving stop of a Curtis Granderson grounder that took a wicked hop at the end.
"That kid wills himself," Francona said. "Who knows? That might have saved our season -- and he's the only guy that makes that play."
September callup Felix Doubront earned the save in the bottom of the 14th.
The winning rally started with a one-out single by Darnell McDonald. Marco Scutaro drew a walk. With two outs, up stepped Ellsbury, and he hammered a no-doubter to right field off Scott Proctor on a 1-0 fastball.
Biggest homer of Ellsbury's career? Perhaps to this point.
"Any time you're in a run for the Wild Card, and you allow your team to get a win, it can't really get too much bigger," Ellsbury said. "Obviously maybe in a playoff game scenario or something like that, but this is our playoff. We've got to win these games to get in the playoffs. I view it as these are playoff games for us."
In this one, the Sox were up by a run with nine outs left. John Lackey left with a runner on first and nobody out in the seventh. But Alfredo Aceves could not prevent the inherited runner from scoring.
Brett Gardner ran for Eric Chavez and stole second. Gardner moved to third on a fielder's choice and tied the game at 4 on a sacrifice fly by Chris Dickerson.
It was a difficult turn of events, considering the Sox had come back from an early 3-0 deficit to take the lead in the top of the seventh.
Lackey gave the Red Sox something they haven't had much of lately -- a quality start. The big righty gave up five hits and four runs (three earned) over six-plus innings. He walked three and struck out four.
"I felt good," Lackey said. "Got some ground balls that guys turned some really great double plays for me that really helped out. It kept my pitch count down a little bit. I felt like I pitched pretty good."
The Red Sox started this one exactly the way they didn't want to, falling into an early hole. After Lackey walked Granderson and gave up a single to Robinson Cano, Mark Teixeira belted one to deep right that looked like a homer off the bat. Instead, it landed at the top of the wall and was shaping up as a two-run double.
But after the throw to the plate, Teixeira raced to third, and Sox catcher Jason Varitek tried to gun him down. That worked out badly, as Varitek's throw sailed down the line and Teixeira came in. Just like that, it was 3-0.
The Sox chipped away, getting one in the fifth and another in the sixth. In the seventh, they produced a pivotal rally. Jed Lowrie got it started with a double. Mike Aviles came on to pinch-run and moved to third on a grounder by Drew. Marco Scutaro drilled a game-tying double to left.
Then Varitek gave the Sox their first lead of the series, smashing an RBI single up the middle.
It would stay tied for what would seem an eternity. But then Ellsbury untied it for good, and perhaps the Red Sox could exhale just a little en route to Baltimore.
"I hope we were breathing before. Maybe every other breath," quipped Francona. "It's a big win. But we've got to get down there and play good tomorrow. But there's no getting around it. That's a big win for us. If you go through a lot of guys in your bullpen, to lose that game would have been tough."