BALTIMORE -- The New York Yankees have overcome one injury after another this season to make a serious run at a postseason berth, so it wasn't all that surprising that they won again after losing shortstop Derek Jeter for the rest of the year.
Is there any obstacle this team can't overcome?
Robinson Cano hit a tiebreaking homer leading off the ninth inning, and New York also got solo shots from Alex Rodriguez and Curtis Granderson in a 5-4 victory over the Baltimore Orioles on Wednesday night.
The Yankees moved past Baltimore and Cleveland and got closer to Tampa Bay in the AL wild-card hunt. New York has hit eight home runs in winning two of three in the four-game series that concludes Thursday night.
"That what you ask for," manager Joe Girardi said. "We have to continue to play well."
Before the game, the Yankees announced that Jeter would miss the rest of the season with an injured left ankle. The Yankees captain played in only 17 games this season and made four trips to the disabled list.
Once it became official that Jeter was lost, the team lamented his bad luck and got back to the business of earning another playoff berth.
"This group fights," Girardi said. "They're continuing to fight."
New York tailed 4-1 on Tuesday before rallying to win. In this one, Baltimore led 3-1 before Granderson homered in the fifth -- New York's first hit -- and Rodriguez tied it in the sixth with his 653rd career home run.
"We get down tonight and come back again," Girardi said. "We were able to take the lead in the ninth. We get a huge homer by Robbie and then a huge hit by Lyle that winds up being a lot bigger."
Jeter's trip to the DL coincided with the arrival of shortstop Brendan Ryan, obtained one night earlier in a trade with Seattle. Although Ryan went hitless, he performed flawlessly and showed good range in the field.
Each team has won nine games this year. The series winner will be determined Thursday night.
"We play this team so evenly, it's unbelievable," Girardi said.
Orioles slugger Chris Davis drove in two runs with a double, making him the first player in team history to have 40 doubles and 40 homers in a season. Danny Valencia tied a career high with four hits, and Roberts had three singles.
Baltimore outhit New York 13-6, but lost a valuable chance to close in on Tampa Bay for the second and final AL wild-card spot.
"We control our own destiny, we control our situation," Orioles center fielder Adam Jones said. "The rest of the way we're playing against teams that are in the same situation as us, so we've got to play better baseball. That's the cool part. We've just got to play a little bit better."
Yankees starter Andy Pettitte gave up three runs and nine hits over 6 1/3 innings. The 41-year-old lefty has made 13 straight starts since September 2007 against Baltimore without losing, going 8-0 over that stretch. Pettitte has lost only twice to the Orioles since 2002 and is 28-6 lifetime against them.
Pettitte has pitched at least six innings in each of his last six starts and is 3-0 in seven outings since Aug. 5.
"It was a great game for us," Pettite said. "The bullpen came in and obviously did a great job. There were some big hits for us. It was a good win, that's for sure."
Baltimore's Scott Feldman allowed only three hits in 7 2/3 innings, two of them homers. The right-hander struck out six and walked two. His first walk came against the first batter of the game and the second was to the last batter he faced.
New York got a first-inning run when leadoff hitter Brett Gardner walked, stole second and scored on two groundouts.
The Orioles took a 2-1 lead in the third. Roberts and Manny Machado singled with two outs before Davis lined a two-run double through the shift into right-field.
Doubles by Valencia and J.J. Hardy made it 3-1 in the fourth, but Baltimore stranded runners at the corners.
New York's David Huff squares off against Wei-Yin Chin in a duel of left-handers in the series finale Thursday night. ... Pettitte has held the opposition scoreless in the first inning over six straight starts after allowing at least one first-inning run in eight consecutive games before that. ... Granderson is 7 for 17 with four homers lifetime against Feldman. ... Feldman threw a season-high 112 pitches.