NEW YORK -- The scuffling Orioles remained steadfast last week that they still had time to get back on track, offering up the looming month of September as an opportunity to make an extended run and catch up in the American League Wild Card standings.
And while the O's face an uphill climb, Sunday's calendar flip was certainly a start. Led by a pair of three-run homers from J.J. Hardy and Adam Jones, Baltimore (72-63) rallied for a seven-run seventh inning to cap a 7-3, sweep-avoiding win against New York.
The victory moves the Orioles back ahead of the Yankees for third place in both the Wild Card and AL East races, three games back of the Tampa Bay Rays, who lost to Oakland on Sunday.
"We were a little flat," Hardy said of an Orioles club that hadn't scored in 18 innings until Matt Wieters' RBI single to start things in the seventh. "We could all see it. We could all feel it. That was big for us. Hopefully, that jump-starts our September."
It certainly helps prop up Baltimore, which has won seven of its last 18 games, and keeps the O's in the hunt as they head to fellow Wild Card foe Cleveland for the final leg of a nine-game, three-city road trip.
"We've got [Justin] Masterson tomorrow. You think we'll be relaxed and confident?," manager Buck Showalter said of his club's tough schedule down the stretch. "That's why people are playing meaningful games this time of the year, because they've got good pitchers you're going to see every day.
"Scoring seven runs in one inning on September 1, we hope it bodes well for a good September, because we're going to need it. It's a good way to start the month."
The decisive seventh got started with Michael Morse -- in his Orioles debut -- and Danny Valencia each picking up their second hit of the afternoon to chase starter Andy Pettitte in favor of right-handed reliever Shawn Kelley. Wieters snapped the scoreless stretch with an RBI single to left-center field, and Hardy blasted the first pitch he saw just over the right-field wall for his 24th homer of the season, giving the O's their first lead of the day.
"Pettitte was dominant pretty much all game," Morse said of the veteran lefty, who was only charged with a pair of runs after he exited. "He's not going to give you much to hit. He's a tough pitcher and we got a couple things going right there, and things went our way."
Brian Roberts kept things going with a bunt single and, after reliever Boone Logan walked Nick Markakis, Yankees manager Joe Girardi brought on the fourth pitcher of the inning in Joba Chamberlain. Jones made Chamberlain pay one out later, sending a 1-1 slider out to deep center field to push the Orioles' lead to four.
"When someone does good, everyone does good," Logan said about the Yankees' bullpen. "When someone [stinks], we all [stink]. It's just one of those days where everybody had a bad game."
The same truth didn't hold for the Orioles, with the bullpen picking up five innings and not allowing a run after a dismal four-inning outing from starter Wei-Yin Chen.
Key in that was rookie righty Kevin Gausman, who turned in two scoreless frames with three strikeouts to help keep the game from getting out of hand. Francisco Rodriguez tossed a 1-2-3 seventh, Tommy Hunter navigated the eighth and Darren O'Day tossed a scoreless ninth to finish off New York.
"Gausman kind of got it going," Showalter said of the potential sweep looming through the game's first half.
"The season's not over today, one way or the other," added Showalter. "We understand the games are dwindling. I've said it a lot of times that September is an eternity, and from experience, you line it up every day and grind it and see where it takes you."
Chen, coming off the worst outing of his career -- in which he allowed eight earned runs over 3 2/3 innings -- continued to struggle with his command and issued a career-high five walks, including a bases-loaded four-pitch free pass to Brett Gardner to plate the Yankees' second run. Derek Jeter followed with a sacrifice fly to push the Orioles' deficit to three and Chen was charged with three runs over four innings.
"Even though I've had the two bad starts, I still have the confidence in me," Chen said through his interpreter. "I gave out a lot of free passes today. The last time, I gave out free passes, too. This is the thing I need to work on. Next time, I believe I will bounce back, and we'll see."
The Orioles hope that Sunday's bounce-back win was the start of something good.
"I love it," Morse, acquired in a waiver claim last week, said of joining the playoff push. "This is what we play for. This is a great team, a great organization, and there's so much upside to this organization and this team. And I think these guys are just starting to touch what they are capable of doing."
Brittany Ghiroli is a reporter for MLB.com. Read her blog, Britt's Bird Watch, and follow her on Twitter @britt_ghiroli. This story was not subject to the approval of Major League Baseball or its clubs.