Andy Pettitte would have four straight wins for the New York Yankees had their bullpen not surrendered a lead in his last start.
The Boston Red Sox made sure that wasn't their most recent blown lead by getting to Mariano Rivera in the opener of this four-game set in the Bronx.
The wild card-chasing Yankees look to regroup Friday night behind Pettitte, who will face fellow left-hander Felix Doubront.
New York (75-65) was one strike away from winning Thursday before Stephen Drew singled home the tying run off Rivera in the ninth inning. Shane Victorino added a go-ahead RBI single in the 10th for the Red Sox's third straight victory and 10th in 12 games, 9-8.
"Just a character win, a team win,'' Boston manager John Farrell said.
The Yankees were on the verge of a dramatic victory, rallying from a 7-2 deficit with six runs in the seventh. Instead they remained 2 1/2 games behind Tampa Bay for the AL's second wild card.
The frustration was evident when reliever Joba Chamberlain was ejected by first base umpire Joe West. Victorino was ruled to have checked his swing against Chamberlain 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.
Pitching for the third straight day, Rivera suffered his sixth blown save. It's unlikely he will be available Friday.
"We just blew it,'' Rivera said.
The Yankees will also be one reliever short in the bullpen since Girardi said right-hander Shawn Kelley is out until next week because of inflammation in his triceps.
Pettitte (10-9, 4.01 ERA) will try to help New York recover after going 3-0 with a 1.05 ERA in his last four outings. He allowed two runs over six-plus innings Sunday when the Yankees allowed seven in the seventh inning of a 7-3 loss to Baltimore.
The left-hander began his streak by yielding three unearned runs to earn a 10-3 win at Boston (85-57) on Aug. 16, improving to 2-1 with a 2.14 ERA in three starts against the Red Sox this year.
He was opposed last month by Doubront (10-6, 3.89), who allowed seven runs over four innings to fall to 2-1 with a 4.41 ERA in three 2013 starts versus the Yankees.
Doubront won his next two outings before lasting 3 2-3 innings and giving up four runs Sunday in a 7-6 victory over the White Sox.
He owns good career numbers against numerous Yankees. Robinson Cano is 2 for 18 against him and Curtis Granderson, Derek Jeter, Mark Reynolds and Ichiro Suzuki are all 2 for 13.
David Ortiz is a .371 regular-season hitter against Pettitte and Jacoby Ellsbury is at .333. Dustin Pedroia is a .229 hitter versus Pettitte and mired in a 6-for-32 slump.
Ellsbury singled and recorded his major league-best 52nd steal in the 10th ahead of Victorino's hit. The Red Sox's speed was on display in the ninth when pinch runner Quintin Berry stole second before Drew drove him in.
The Red Sox lead the Rays by 6 1/2 games in the AL East.