NEW YORK — After beating the New York Yankees on consecutive nights, the Baltimore Orioles were seven games behind Texas for the AL's second wild card with 23 games left and four other teams in front of them.
"We're going to try and win out. Crazier things have happened," manager Buck Showalter said following a 5-3, come-from-behind win Wednesday night. "I tell them all the time in advance meetings, today's an opportunity to start doing the things that we're capable of doing."
A 3-15 late-summer slide dropped the Orioles from contention. They won consecutive games for the second time since mid-August and had a chance to gain a little more ground when Texas played a late game at Seattle.
After a day off, the Orioles open a three-game series at home Friday against AL champion Kansas City.
"It starts now," said Steve Pearce, who broke a 3-3 tie in the eighth with a solo homer off Adam Warren (6-6). "We've haven't been playing good baseball, but there's a lot of baseball left and we can turn it around, and it started with this series."
Carlos Beltran homered and drove in three runs for the Yankees. New York took a 3-1 lead in the third against Ubaldo Jimenez (11-9), who retired 13 of his last 14 batters.
"We've seen many times this year him pitch real well, like he did tonight, in a tough environment, on the road against a good team, that's scratching and clawing for everything," Showalter said.
Jimenez allowed four hits in seven innings, struck out eight and walked none to win his second straight start after going winless in four outings.
"You have to take every game like it's the last and try to go with everything you have and let's see what happens," Jimenez said.
New York got only one hit after the third. Darren O'Day and Zach Britton finished the four-hitter, with Britton saving his 32nd game in 35 chances.
Wearing a new brace on his surgically repaired right knee, CC Sabathia made his first start since Aug. 23 when he cut an outing short because of knee pain. Sabathia left with a two-run lead, the bases loaded and two outs in the fifth, and Jonathan Schoop hit a one-hopper to third baseman Chase Headley. But second baseman Stephen Drew allowed the throw to bounce past him for an error that let Baltimore tie the score at 3-3.
Drew's shaky night began when Gerardo Parra's first-inning bouncer on what could have been a double play bounced off the second baseman's glove and face, limiting him to a forceout when he recovered. Chris Davis singled in a run with two outs on a catchable soft fly that dropped in front of Beltran in right.
Davis added a run-scoring double in the eighth against Brian Mitchell and reached base five times (2 for 2, two walks and a hit batter).
"We're back into a corner," Pearce said. "It's a long shot, but we know we're not out of this thing."
Manny Machado has reached base in 21 consecutive games against the Yankees.
Orioles: Center fielder Adam Jones sat out for the second straight game because of a sore right shoulder.
Orioles: Mike Wright (2-4) starts the opener against the Royals, who are slated to start Danny Duffy (7-7).
Copyright 2015 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.