PHOENIX -- Adam Eaton was looking for a fastball but saw a slider. Muscle memory took over from there.
Eaton homered on the first pitch of the bottom of the ninth inning, lifting the Arizona Diamondbacks to a 7-6 win over the Baltimore Orioles on Monday night.
"When it's a slider, I used the saying 'blacked out' because my body just reacted," Eaton said. "You're not conscious of what you're doing, your body just takes over. I don't even know what I hit. I don't even remember touching the bags or anything."
Baltimore's Chris Davis tied the game at 5-5 in the eighth inning with his 43rd home run of the season. The left-handed-hitting Davis went deep off Arizona's left-handed specialist, Joe Thatcher.
Wil Nieves answered for Arizona in the bottom of the inning when he hit a line drive that bounced off the top of the left-field fence into the stands for his first home run since Aug. 9, 2012, which was his first game with the Diamondbacks. The homer gave Arizona a 6-5 lead.
"Wil's been swinging the bat well for us," said Arizona manager Kirk Gibson. "They were trying to throw some offspeed stuff to him, they came in on him and the ball hit the top of the wall. It was a good break for him."
Diamondbacks right-hander Brad Ziegler (6-1) couldn't hold the lead in the top of the ninth. Alexi Casilla hit a one-out single, stole second, went to third on a single by Nate McLouth and scored on a Nick Markakis sacrifice fly to make it 6-6.
"The important thing is we didn't give up the lead," Gibson said.
Darren O'Day (5-2) came on to pitch for Baltimore, but he made just one pitch. Eaton reached out with a looping swing to send the ball into the pool beyond the right-field fence.
Arizona had rallied from a 4-2 deficit with three runs in the seventh on RBI singles by Eaton, Aaron Hill and Martin Prado off Brian Matusz and Tommy Hunter.
The Orioles jumped in front of Arizona and Wade Miley four batters into the game.
Markakis beat out an infield single, and he went to second on a single to right by Manny Machado. Markakis advanced to third when Adam Jones grounded into a double play and scored on a wild pitch.
Baltimore made it 2-0 in the second when J.J. Hardy doubled and scored on Brian Roberts' single.
"I wasn't in a good rhythm in the first couple of innings," Miley said. "I really didn't have a good feel for any pitch. I was just trying to battle and keep us in the ballgame."
The Diamondbacks tied the game in the bottom of the second. Hill led off with his third home run in as many games. Prado then walked and Gerardo Parra reached first when Prado was forced at second.
Parra's legs took things from that point.
He stole second and was attempting to steal third when Scott Feldman uncorked a wild pitch. Feldman covered the plate and Parra was thrown out easily at home by Wieters. However, third base umpire Alfonso Marquez ruled Parra safe because there was interference when Machado and Parra had gotten tangled up at third as the Diamondbacks outfielder rounded the bag.
"It was the wrong call," said Orioles manager Buck Showalter. "It was a lapse in judgment. He was out by three steps. The man would have had to lay down and block his way. It is unfortunate in a one-run game."
The Orioles regained the lead in the fourth when Steve Pearce singled and scored on a double by Roberts into right field.
Feldman went 5 1/3 innings, allowing two runs (one earned) on four hits with two walks and eight strikeouts.
"From the second inning on they did a good job of getting my pitch count up there," said Feldman, who threw 108 pitches.
NOTES: Machado was charged with an error on the interference call. He has nine errors this season. ... Hill last homered in three straight games June 18-20, 2012. ... Arizona OF Cody Ross was placed on the 15-day disabled list after suffering a dislocated right hip on Sunday. He might have corrective surgery as early as Tuesday. ... The Diamondbacks optioned RHP Zeke Spruill to Triple-A Reno, one day after he allowed five runs (one earned) in three innings. Arizona recalled LHP Tyler Skaggs and RHP Chaz Roe from Reno, giving the Diamondbacks nine pitchers in the bullpen. ... Gibson said RHP Trevor Cahill, on the 15-day since July 1 with a contusion on his right hip, could be back in the rotation by the end of the week. ... Hardy has hit safely in nine consecutive games.