BALTIMORE -- The Yankees scored the go-ahead run in the ninth inning on a wild pitch by Orioles closer Jim Johnson, and New York earned a 6-5 victory Thursday to take three of four games in the crucial series against Baltimore.
The win was especially big for the Yankees because the teams entered the night with their season series even at nine. As a result, if the two are tied for the wild card at the end of the season, the play-in game would be held at Yankee Stadium.
Mark Reynolds, facing his former team, hit his 19th homer of the season and second in the series. It was also the 200th home run of his career. Curtis Granderson hit his sixth homer for New York.
Johnson entered in the ninth and allowed a leadoff single to Brendan Ryan. Chris Stewart bunted, and Johnson (3-8) sailed his throw into center field, leaving runners at first and second. A sacrifice bunt by Granderson set up the decisive wild pitch.
Nick Markakis hit his 10th home run of the season for Baltimore. Danny Valencia added his eighth homer, a three-run shot off David Robertson that tied the game in the eighth inning.
Mariano Rivera (6-2) was credited with the win after pitching a 1-2-3 ninth inning. Robertson would have been in line for the victory, but the official scorer chose not to give him credit because he pitched briefly and ineffectively.
Orioles starter Wei-Yin Chen overcame a shaky start, giving up five runs on seven hits and tying a career high with nine strikeouts over 6 1/3 innings. Chen allowed the Yankees to go 6-for-15 with a double and a home run in the first three innings, but he then retired 13 consecutive batters before allowing the homer to Granderson in the seventh that gave New York a 5-1 lead.
Yankees starter Phil Hughes was replaced by David Huff after three innings and 50 pitches. Hughes gave up one run and three hits with three strikeouts. He also had two wild pitches and left with a three-run lead.
The Yankees opened the scoring in the second on a two-run homer by Reynolds that was scorched over the left field fence. It was the eighth homer allowed by Chen in his past six starts.
New York increased the lead to 4-0 in the third on a two-run single by Vernon Wells.
Manny Machado put the Orioles on the board in the bottom of the third with a single that scored Matt Wieters.
NOTES: The game was delayed one hour and 18 minutes because of thunderstorms in the area. ... Yankees CF Brett Gardner left the game after the first inning with a left oblique strain and was replaced by Granderson. ... The Orioles honored Rivera before the game with a bronze sculpture of a broken bat. Baltimore manager Buck Showalter joked in his pregame press conference that, "I'd like to give him a blown save tonight." ... Orioles RHP Bud Norris was originally scheduled to start Friday in Toronto but was scratched for the series because of elbow soreness.