BALTIMORE (AP) -- 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.
Nate McLouth homered leading off the bottom of the 10th inning, Dickerson hit a pair of solo shots and the Orioles beat the New York Yankees 3-2 Tuesday night to snap a six-game losing streak.
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.
Gonzalez retired 11 straight batters before David Adams singled with two outs in the seventh. Lance Nix followed with a liner that right fielder Nick Markakis snagged with a dive.
Copyright 2014 Associated Press. All rights reserved. This material may not be published, broadcast, rewritten, or redistributed.