BALTIMORE -- A series that began with a disheartening defeat ended in uplifting fashion for the Baltimore Orioles.
Nick Markakis added a solo home run for the Orioles, who took two of three from New York to pull within three games of the first-place Yankees in the AL East.
In the opener Monday night, Baltimore closer Jim Johnson blew a ninth-inning lead and Baltimore absorbed its sixth straight loss. The Orioles rebounded to win in 10 innings on Tuesday night before coasting in the finale.
"Anytime a division rival comes in, you want to try to win the series especially when you're at home," Davis said. "We avoided the snowball effect to some degree and were able to get back on track."
Jason Hammel (6-2) gave up two runs and seven hits in 6 2/3 innings to even his lifetime record against the Yankees to 3-3. The right-hander allowed a combined 13 earned runs over 8 2/3 innings in his previous two starts.
In part because Hammel got back on track, so did the Orioles.
"It's huge, especially after losing six in a row," he said. "To come out and play these guys toe to toe and come out with two out of three, I think, is pretty good."
Yankees starter Hiroki Kuroda left in the third with a bruised right calf, one inning after he was struck in the leg by a line drive off the bat of Manny Machado. Kuroda (6-3) allowed five runs and eight hits in two-plus innings.
"I wasn't too worried about the injury beyond tonight but was worried that it might matter tonight and it did," Yankees manager Joe Girardi said. "I thought he had trouble pushing off it. It was unfortunate that he was hit by the ball."
Girardi suspected Kuroda would be able to make his next start, but the right-hander wasn't sure.
"It will depend on how I feel tomorrow, but for me, I'm going to make that start," Kuroda said through a translator.
Curtis Granderson homered, doubled and singled for New York. Needing a triple to reach the cycle, he drew a walk in the seventh inning.
Playing in his seventh game since returning from a broken wrist, Granderson batted leadoff and played center field for the first time. He came in batting .174.
"It's like an opening week of the season for me. No different," he said before the game.
Girardi said, "I liked how he was swinging the bat. I thought it was a matter of time before he started getting some hits. He swung the bat great tonight."
David Adams hit a ninth-inning homer for the Yankees, his second in three games. The teams combined for 13 home runs in the series, including five in the finale.
After Kuroda retired the first two batters he faced, Markakis homered. Adam Jones followed with a single and Davis hit a 3-2 pitch over the wall in center.
In the second, Nate McLouth singled with two outs, stole second and took third on Machado's single off Kuroda's leg. Although Markakis hit a fly to end the threat, at that point the Orioles had six hits -- one more than Kuroda allowed in his complete game shutout against Baltimore on April 14.
The Yankees got a run back in the third when Granderson doubled and scored on a single by Robinson Cano.
But Baltimore pulled away in the bottom half. Jones doubled and after Davis singled, Kuroda grimaced near the mound. A discussion involving the New York trainer, Kuroda and Girardi ensued. The right-hander eventually walked off the field.
Preston Claiborne entered, and Wieters homered on the rookie's second pitch. It was the first run allowed by Claiborne after seven straight scoreless outings in the majors.
Granderson homered in the fifth to make it 6-2.
The Orioles will recall RHP Kevin Gausman on Thursday, and the 22-year-old will make his major league debut against Toronto. Gausman was the fourth overall pick in the 2012 draft. ... After a day off Thursday, the Yankees begin a three-game series on the road against Tampa Bay. ... Orioles INF prospect Jonathan Schoop will need 6-8 weeks rest after an MRI revealed a stress fracture in his lower back, Orioles VP Dan Duquette said. ... New York 1B Mark Teixeira (wrist) and INF Kevin Youkilis (lumbar spine sprain) faced six minor league pitchers in a simulated game at the team complex in Tampa, Fla. ... Ichiro Suzuki extended his hitting streak at Camden Yards to 21 games.