A.J. Pollock doubled to start the 12th-inning rally for Arizona against Chris Perez, who pitched a scoreless 11th frame. Perez then hit pinch hitter Cliff Pennington with a pitch, and both runners were sacrificed into scoring position for Hill. They were the first two runs allowed by Perez this season.
It was the first loss of the season for the Dodgers in six games against Arizona, and nearly came in regulation.
Down 2-1 in the ninth inning, Juan Uribe hit one off the left field foul pole against Arizona closer Addison Reed to tie the game, Uribe's third home run of the season.
The Diamondbacks took advantage of a wild Chris Withrow, scoring the go-ahead run in the ninth inning on a wild would-be intentional ball.
Miguel Montero, who homered in the sixth inning, drew a leadoff walk against Withrow in the ninth in a 1-1 tie. After pinch runner Tony Campana stole second then advanced to third base on a ground out. The Dodgers planned to walk Martin Prado, but on an intentional ball Withrow sailed a pitch over the head of catcher Tim Federowicz to the backstop, allowing Campana to score the go-ahead run.
Withrow, who pitched a scoreless eighth inning, walked three and had two wild pitches in the ninth, though the second wild pitch was a ball Federowicz probably should have blocked. Withrow walked three batters in eight innings this season entering Friday.
Zack Greinke struck out eight and only allowed the one run on three hits and two walks, but was done after needing 105 pitches to get through his six innings. He left trailing despite allowing no more than one run for the 16th time in 32 starts as a Dodger.
"I didn't throw enough strikes in the first three innings. I wasn't pitching good until starting the fourth inning, when it got a little bit better," Greinke said. "They did a good job, but I wasn't executing well."
"He was great, a little bit rough in the first inning, but he figured it out and was able to hit his spots and like he always is," Federowicz said. "He can throw anything at any time, at any spot."
Montero hit a 74-mph curve for the home run.
"I tried to go in the strike zone with a pitch I didn't think he would put too much damage on. It was the wrong choice," Greinke said. "I had to shake three or four times to get to it, so obviously Fed didn't think it was a good idea. He was right."
In his last 20 starts, Greinke has allowed 25 total runs, with a 1.73 ERA, 125 strikeouts and 26 walks in 131 innings during that span. In the last 16 of those starts, Greinke has last at least five innings and allowed two or fewer runs, the longest streak in baseball dating back to 1914.
Greinke was proud of the streak.
"I think it takes a lot of skill to do it, but you have to get a lot of breaks, and I've had more than my share," he said. "If you're not pitching really good, you can't do it. It's a nice accomplishment."
Up 1-0 in the seventh inning, Diamondbacks starter Wade Miley was allowed to hit for himself despite having thrown 106 pitches to that point. His second pitch to leadoff man Scott Van Slyke in the seventh inning was deposited into the right field pavilion, the fourth extra-base hit for Van Slyke in eight plate appearances against Miley this year.
Van Slyke against southpaws in 2014 is 6-for-10 with two home runs, three doubles and four walks.
Trevor Cahill, banished to the bullpen with his 0-4, 9.17 ERA start to the season, made his second career relief appearance in the 12th inning. He retired the Dodgers in order for his first career save.
The Dodgers have scored just seven runs in their last four games after scoring 28 in their previous four games.
This game is so stupid sometimes. You swing the bats you get eight or seven, hitting the ball all over the place, next thing you know you're having trouble putting runs on the board. But it's the flow of the game," manager Don Mattingly lamented. "You'd like your guys to be robots and hit every time up and get hits when we need them, but it doesn't work that way."
The Dodgers have played three consecutive extra-inning games at home, matching its longest streak at Dodger Stadium. The last such streak ran from Aug. 5-7, 1982 against the Braves, part of four extra-inning games in five days.
Yasiel Puig walked his first two times up against Miley and again in the eighth, matching a career high with three bases on balls. Three of Puig's six career multi-walk games have come against the Diamondbacks.
Matt Kemp's single to center field with two outs in the fourth was not only the first hit off Miley, it was Kemp's first hit in 14 at-bats against left-handed pitchers this season.
Hanley Ramirez walked in the sixth inning and singled in the 10th. He has reached base in 12 straight games. Mattingly said Ramirez didn't look affected by the hit by pitch.
"I was looking at him over the course of the night. He's swinging the bat hard. I watched his BP, he's not having different swings. I think he'd let us know, too," Mattingly said. "He may be a little tender with it, but I think he's okay."
Adrian Gonzalez singled in the 10th inning to extend his hitting streak to 13 games.
The Dodgers and Diamondbacks go at it again on Saturday evening with a weird 5:10 p.m. PT start thanks to the game being televised by Fox Sports 1. Dan Haren gets the call for the Dodgers, while Michael Bolsinger makes his first major league start for Arizona. Bolsinger, a 26-year-old right-hander, made his major league debut on Monday with three innings of relief.
Home runs: Scott Van Slyke (2), Juan Uribe (3); Miguel Montero (2)
WP - Joe Thatcher (1-0): 1⅓ IP, 1 hit
LP - Chris Perez (0-1): 2 IP, 2 hits, 2 runs
Sv - Trevor Cahill (1): 1 IP, 1 strikeout