Stephen Drew hit a tying single off the all-time saves leader with two outs in the ninth inning, then Shane Victorino lined a go-ahead single in the 10th that sent the Red Sox past the Yankees 9-8 in a Thursday night thriller.
"Just a character win, a team win," Boston manager John Farrell said.
The Red Sox rallied in the opener of a four-game series loaded with playoff implications. It felt like a playoff matchup, too, especially after New York erased a 7-2 deficit with six runs in the seventh.
There were plenty of pitching changes and pinch-hitters and a key pinch-runner who will certainly remind some Red Sox fans of Dave Roberts' daring dash from the past. Plus, there was an outburst -- Joba Chamberlain (2-1) was ejected by first base umpire Joe West, who ruled Victorino checked his swing right before the deciding hit.
"It's frustrating because, you know what, I thought he went. But you have to be able to overcome things," Yankees manager Joe Girardi said.
The Red Sox own the best record in the AL, and won for the 10th time in 12 games. The Yankees had their three-game winning stopped in a loss that blunted their push for a wild-card spot.
This was the start of an 11-day stretch in which the longtime rivals will face each other seven times. Boston is 8-5 against the Yankees this year.
"We just blew it," Rivera said.
Rivera entered with an 8-7 lead and got two quick outs. But Mike Napoli singled on a full count and speedy pinch-runner Quintin Berry took off on the next pitch, stealing and continuing to third when catcher Austin Romine's errant throw bounced away. Drew tied it and handed Rivera his sixth blown save in 47 tries, a day after the closer was needed for four outs.
"He's the best in the game," Drew said. "He's been fun to watch on the other side. But getting out there with two outs and trying to do your job, it makes it tough. He's been doing it his whole career, so it's just one of those things that worked out for me tonight."
Berry's steal might get Red Sox rooters thinking about when Roberts stole second as a pinch-runner -- also with Rivera on the mound -- to rescue the Red Sox in Game 4 of the 2004 AL championship series, sending them toward to a long-elusive title.
Well ahead in the AL East this year, these Red Sox still have a long way to go to match that championship run.
"If it leads us to where Dave did, we'll take that, too," Farrell said.
"Tonight was the first time he's been pressed into that specific spot, and he came through," he said about recently acquired Berry.
Jacoby Ellsbury singled with one out in the 10th off Chamberlain and stole second. Victorino held up on a half-swing, West ruled, and lined a single that sent Ellsbury scooting home. Right fielder Ichiro Suzuki made a strong throw, but Romine couldn't handle it.
Koji Uehara earned his 18th save, extending his scoreless streak to 26 innings over 23 games.
Lyle Overbay's two-out, two-run single capped a six-run rally in the seventh that put the Yankees ahead 8-7. Down 7-2, New York broke loose against starter Jake Peavy and relievers Matt Thornton and Junichi Tazawa.
The Yankees also stole a season-high six bases.
A day after a 20-4 romp over Detroit in which it tied a team mark with eight home runs, the highest-scoring club in the majors kept up the homer barrage behind Will Middlebrooks and Victorino.
Brett Gardner's RBI single in the seventh got the Yankees within 7-3. Robinson Cano, who drove in three runs, had an RBI grounder. Soriano met Tazawa with an RBI single, Curtis Granderson doubled home a run and Overbay's single put New York ahead.
Middlebrooks hit a solo homer off Ivan Nova for a 3-2 lead in the fourth. Victorino homered to begin a three-run fifth for a 6-2 lead.
Girardi said RHP Shawn Kelley is out until next because of inflammation in his triceps. ... Boston LHP Felix Doubront (10-6, 3.89) starts Friday night vs. LHP Andy Pettitte (10-9, 4.01). ... Red Sox RHP Clay Buchholz (neck strain) gave up two runs on four hits and two walks in 3 2/3 innings in a playoff game for Triple-A Pawtucket. It was his final minor league rehab start, and the Red Sox are hoping he can start Tuesday night at Tampa Bay. ... Red Sox C Jarrod Saltalamacchia missed his third straight game because of a sore back. Farrell said he expected Saltalamacchia to be in the lineup sometime this series. ... The Yankees tied a team record with six different players stealing at least one base. The last time it happened was 1916 when Roxy Walters, Wally Pipp, Lee Magee, Frank Gilhooley, Hugh High and Paddy Baumann each swiped one.