BALTIMORE — Corey Patterson spent much of the night running the bases and sprinting after fly balls in center field.

BALTIMORE — Corey Patterson spent much of the night running the bases and sprinting after fly balls in center field.

At the finish, however, he won the game with a leisurely jog from third to home.

Patterson capped a perfect performance at the plate by scoring on Scott Proctor's bases-loaded walk in the ninth inning, giving the Baltimore Orioles a 3-2 victory over the skidding New York Yankees on Tuesday night.

Ashland product Jeremy Guthrie started for the Orioles but didn't figure into the decision.

Patterson led off the ninth with a walk and Brian Roberts singled. Proctor (1-5) then made a sensational diving catch on a bunt by Chris Gomez, but missed an opportunity to double up Patterson, who had strayed three-quarters of the way to third base.

After a walk to Nick Markakis loaded the bases, Proctor appeared to hit Ramon Hernandez with a pitch. Plate umpire Rob Drake ruled otherwise, but Hernandez drew a walk when Proctor missed on a 3-2 count.

"We walked ourselves right out of this game," Yankees manager Joe Torre said.

Torre and Proctor agreed that the leadoff walk to Patterson was as excruciating as the game-ender to Hernandez.

"The first guy is everything, especially when you walk them," Proctor said. "I let everybody down. I'm just (mad) at myself. You can't walk people. It's embarrassing."

Patterson went 3-for-3 with a walk, stole a base, scored two runs and drove in one as the No. 9 hitter. In the process, he upped his batting average 11 points to .224.

"He was our secret weapon tonight," Orioles interim manager Dave Trembley said.

Johnny Damon hit a two-run homer for the Yankees, who have lost three straight and six of seven. New York stranded seven and went 0-for-5 with runners in scoring position.

Guthrie allowed two runs and seven hits in 61/3 innings, his shortest outing in nine starts since May 8. Five of the seven hits he allowed came in his final 11/3 innings of work.

"I sensed that the momentum was getting on their side, that it was time to make a change," Trembley said.

Guthrie struck out six and walked one. The rookie right-hander is 3-0 with seven no-decisions in his last 10 starts.

Chris Ray (4-5) worked the ninth to complete a solid performance by the Baltimore bullpen, which gave up one hit over 22/3 scoreless innings.

Down 2-0, New York pulled even against Guthrie in the sixth. Miguel Cairo hit a one-out single and Damon, who had previously struck out twice, followed with his fifth home run — a drive to right on a 1-1 pitch.

Damon was in a 4-for-31 skid before connecting.

Through the first five, Baltimore stranded eight and was 1-for-8 with runners in scoring position.