Rapid Reaction: Yankees 4, Red Sox 3

NEW YORK -- Three outs away from the Baltimore Orioles deciding to vote a playoff share for Dustin Pedroia, the Red Sox instead added another numbing episode to a season that has known no other kind, losing 4-3 in 12 innings Tuesday night to the New York Yankees.

The night before, Andrew Bailey’s former teammates in Oakland held a wild celebration after they clinched a playoff spot thought impossible in the spring.

Tuesday night in the Bronx, Bailey set the stage for another playoff party when the Red Sox closer blew a 3-1 lead in the ninth to the Yankees, who tied the score on a two-run home run by pinch-hitter Raul Ibanez, who won it three innings later with an opposite-field single off Andrew Miller.

Mark Melancon replaced Bailey and escaped a bases-loaded predicament to send the game into extra innings, and center fielder Jacoby Ellsbury, who did not play Monday night in part because Bobby Valentine said he liked Che-Hsuan Lin’s defense in center, robbed Alex Rodriguez of extra bases with Nick Swisher on base to end the 11th. But the Yankees won in the 12th when Miller issued back-to-back two-out walks and a ground-ball single through the left side by the 40-year-old Ibanez.

The winning pitcher? None other than one-time Sox pitcher Derek Lowe, one of the heroes of the ’04 World Series winners, who gave the Yanks two innings of scoreless relief.

Presented with a perfect excuse to sit out the last two games -- X-rays showed he’d fractured the ring finger on his left hand -- Pedroia instead texted manager Bobby Valentine and said he planned to play Tuesday night.

“I fell off my bike,’’ Valentine said. “Literally.’’

For that, we have to take the manager’s word. There were no witnesses.

But there was an announced crowd of 41,564 on a cool, damp night in the Bronx that watched Pedroia double home Ellsbury and score on Cody Ross’s sacrifice fly as the Sox took a 2-0 lead in the first. Jon Lester held the Yankees to an unearned run in five innings, and when James Loney hit his second home run in 95 at-bats with the Red Sox in the ninth off Yankees closer Rafael Soriano, the Sox were in great position to drop the Yanks into a first-place tie with the Orioles, 1-0 winners over Tampa Bay.

But instead, Curtis Granderson singled ahead of Ibanez, who drove a 2-and-0 pitch into the first deck.

The Yankees had not won a game all season in which they trailed after eight innings. They are now 1-58, the final indignity foisted on Bailey when Valentine lifted him for Melancon (6.44 ERA) to face Mark Teixeira.

Melancon splintered Teixeira’s bat in inducing a fly ball to shallow center field, Derek Jeter holding at third, and retired Robinson Cano on a roller to second.