NEW YORK -- The Orioles are getting their groove back.
After dropping five of six games in the season's first week, the O's -- who have preached patience in the infancy of the 162-game grind -- spoiled the heralded Yankee Stadium debut of Masahiro Tanaka on Wednesday night, edging New York with a 5-4 series win for their first back-to-back victories this season.
Panic? Not this group. Baltimore used some stout relief pitching -- including two key outs by lefty Brian Matusz -- and rode a big night from rookie infielder Jonathan Schoop to record its first series win in the Bronx since 2012.
Tanaka, who struck out 10, was "as advertised, as paid for," manager Buck Showalter said of New York's new seven-year, $155 million man. "He's going to be a great contributor here. You feel fortunate any time you can end up with a 'W' with him on the mound."
It was after Tanaka got off the mound that the Orioles made their move. With the score tied at 3, the O's scored a pair of runs off reliever Shawn Kelley in the ninth inning with a rally that started with Ryan Flaherty legging out a leadoff double. Coming off a career-high three-hit performance on Tuesday, Flaherty -- who started the season 1-for-21 -- sent a ball into center field and moved to third on Schoop's second hit of the night.
Nick Markakis singled in the go-ahead run and, after Delmon Young delivered his third hit, Chris Davis' sacrifice fly pushed the lead to two.
It was Schoop who put the Orioles up early with a towering three-run homer off Tanaka two outs into the second inning. Schoop crushed a 1-0 slider, sending it into the second deck of the left-field seats just on the right side of the foul pole.
"If you want to play, you have to make some adjustments," said Schoop, who has struggled with hitting offspeed pitches. "You have to know what they are trying to do with you, and you have to make the adjustments. He threw me a slider and then threw me another slider."
And although Schoop's homer will draw headlines, Matusz got two outs on the biggest stage, stranding a pair of inherited runners in the bottom of the eighth.
"That was huge," said closer Tommy Hunter, who allowed a run in the ninth before picking up his third save. "It was a big situation going in, and he knows it.
"He's good at what he does, and I'm glad he's on our side."
Things started when right-hander Evan Meek, on for his second inning, allowed a leadoff double to Brett Gardner and exited in favor of Matusz after Derek Jeter's sacrifice bunt. Matusz retired Jacoby Ellsbury on a foul popup and issued an intentional walk to the red-hot Carlos Beltran to bring on Brian McCann, who flied out to center to keep it tied.
Matusz has stranded 51 of 56 inherited baserunners since the start of the 2012 season, evolving into quite the late-inning weapon for the Orioles.
"You take so much pride in that," Matusz said. "There's no better feeling than going out there and stranding some runners and keeping the team in the game and giving the guys a chance to come back and win the ballgame like we did today."
The Orioles battled early off Tanaka, working him for 58 pitches through three innings, but he settled in and needed just 16 pitches to record his final six outs, retiring 13 of 15.
If it gave the O's any particular satisfaction winning with Tanaka on the mound, they weren't divulging.
"It's nothing special to me," center fielder Adam Jones said. "He's just another pitcher in their rotation. He's just another guy we have to go through to get to where we want to be."
With considerably less fanfare, Orioles starter Miguel Gonzalez gutted out six innings despite a pair of early homers. The right-hander, coming off a disastrous season debut in Detroit, kept the Yankees off the board in his final two innings and had just one clean frame the entire night.
Staked to an early three-run lead, Gonzalez gave it right back, with Beltran opening the bottom of the second with a homer and Johnson adding one two outs later. Beltran struck again with a leadoff double in the fourth and scored on Alfonso Soriano's groundout to tie the score at 3. Gonzalez pitched around a pair of singles in the fifth and got a double-play ball from McCann to erase Beltran's third hit of the night in the sixth.
"First I was a little up, a couple of my pitches I couldn't finish," Gonzalez said, "but then toward the end, [catcher Matt Wieters] told me, 'Just be yourself and make your pitches and try not to do too much,' and the last two innings were great."
Hunter navigated around an exciting final frame. He allowed a leadoff double to Soriano, then Davis couldn't get a handle on Johnson's ball down the line, putting runners on the corners. Former Oriole Brian Roberts hit a sacrifice fly to bring New York within a run, but Hunter got a double play to stop the scoring there.
"This is a hard job," Showalter said. "Closing out games against teams like the Yankees on the road is hard. ... Tommy's off to a good start considering his lack of experience."
Brittany Ghiroli is a reporter for MLB.com. Read her blog, Britt's Bird Watch, and follow her on Facebook and Twitter @britt_ghiroli. This story was not subject to the approval of Major League Baseball or its clubs.