NEW YORK (AP) — Mark Teixeira and Chase Headley hit solo home runs off Koji Uehara in the ninth inning, and the New York Yankees stunned the Boston Red Sox 5-4 Thursday night to bolster their slim playoff hopes.

New York had just one hit since the third inning before Teixeira drove a pitch into the second deck in right field for his 21st home run this season. One out later, Headley homered deep into the right-field bleachers against Uehara (6-5).

Adam Warren (3-5) pitched a scoreless ninth for the Yankees, who began the night four games out of the second AL wild-card spot and are in danger of missing consecutive postseasons for the first time since 1992 and '93.

David Ortiz homered twice and drove in three runs for the Red Sox. Brock Holt put Boston ahead 4-3 with a fifth-inning homer, then made a great sliding grab in the bottom half.

More From 104.5 THE TEAM