(BALTIMORE) -- On the same day they found out Derek Jeter would be lost for the remainder of the season with an ankle injury, the New York Yankees still found a way to win.
Robinson Cano broke a 3-3 tie with a solo home run in the top of the ninth inning, Alex Rodriguez and Curtis Granderson also homered to lead the Yankees to a 5-4 win over the Baltimore Orioles.
The Yankees moved past Baltimore and Cleveland in the AL wild-card hunt and closed within one game of the Tampa Bay Rays, who lost a 7-3 decision to the Boston Red Sox Wednesday night.
"That what you ask for," manager Joe Girardi said. "We have to continue to play well."
The Orioles led 3-1 in the fifth inning before Granderson's home run made it 3-2. Rodriguez tied the game in the sixth with a solo shot of his own.
Andy Pettitte pitched 6 1/3 innings, giving up three runs on nine hits. Mariano Rivera gave up a run in the ninth but still managed to earn his 43rd save of the season.
Copyright 2013 ABC News Radio.