BALTIMORE -- The shaving cream was still glopped on Chris Dickerson's head and shoulders long after the final pitch, a tell-tale indicator that the Baltimore Orioles had finally returned to celebratory mode at Camden Yards.
McLouth hit a 1-1 pitch from Vidal Nuno (1-1) into the bleachers in right-center to give the Orioles their first win since May 12. Dickerson, who played sparingly for the Yankees in each of the past two seasons, connected off Phil Hughes in the third and fifth innings -- the first two-homer game of his career.
For their efforts, McLouth and Dickerson each got a shaving cream pie from teammate Adam Jones during their postgame interviews. It was a fitting way to mark the end of a skid in which all six defeats came at home.
"We really needed this win," Dickerson said. "This team continues to grind, continues to push forward even when the chips are down. Nate came up huge. This was one of those things that can turn it around."
Asked if it was the best night of his baseball career, Dickerson quickly replied, "Absolutely. Under the circumstances, yeah. ... As soon as I saw the lineup card I was already fired up, just to get the opportunity to play against them. But to go out and have that result, it was awesome."
Jim Johnson (2-4), who blew three save opportunities during the six-game skid, got three straight outs in the 10th.
"I'm just happy about the outcome of the game," Johnson said.
His performance capped an exceptional effort by Orioles pitchers, who retired 21 of the last 22 New York batters.
"It was nice to win, period," manager Buck Showalter said. "Anytime, regardless of yesterday and the day before. We don't get bogged down in that woe is me and this means that. You've got to keep turning the page."
Travis Hafner drove in both runs for the Yankees, who fell to 19-1 when scoring first. Dickerson's role in New York's defeat did not go unnoticed by manager Joe Girardi.
"We've had him up a couple times and he's done some good things for us," he said. "He helped them tonight."
Hughes allowed two runs and five hits in six innings. Coming off a horrid start against Seattle in which the right-hander yielded seven runs and got only two outs, Hughes kept the Orioles in check -- except for Dickerson.
"I thought he did OK," Girardi said. "He gave us a great chance to win the game."
Both bullpens matched zeroes until Nuno threw his third pitch.
"It was supposed to be a cutter away," the left-hander said. "It felt a little bit off and he took advantage of it. One pitch and it cost us the game. Got to forget about it and get ready to pitch tomorrow."
Baltimore starter Miguel Gonzalez gave up two runs and five hits over seven innings, striking out five and walking none. The right-hander came off the disabled list before the game following an 18-day absence with a blister on his right thumb.
"It was fun to be out there again after two weeks being out and giving a chance to my team to win a ballgame," Gonzalez said. "I think that was fun, especially getting ahead of guys. That was important."
New York got a first-inning run when Brett Gardner doubled and scored on a two-out single by Hafner. Dickerson tied it with a drive to right-center on a 3-2 pitch.
The Yankees quickly moved back in front. Vernon Wells led off the fourth with a double and Hafner followed with an RBI single.
Dickerson's second homer of the game, leading off the fifth, made it 2-all.
To clear a roster spot for Gonzalez, the Orioles optioned RHP Jair Jurrjens to Triple-A Norfolk. Jurrjens started one game for Baltimore, receiving a no-decision Saturday against Tampa Bay. ...RHP Hiroki Kuroda will start for New York on Wednesday night in the finale of the three-game series. The Orioles will start Jason Hammel, who is 0-2 with a 7.79 ERA in three home starts. ... Yankees manager Joe Girardi said SS Derek Jeter (left ankle) "is not really doing anything yet" and LHP Andy Pettitte (strained trapezius muscle) has not starting throwing. ... Orioles C Matt Wieters turned 27 on Tuesday.