A balk by Esmerling Vasquez allowed Casey Blake to score the winning run in the bottom of the ninth, giving the Dodgers a 5-4 victory Monday night.

The inning began with a walk to James Loney and a broken-bat single by Blake. Loney made a break for third base with Augie Ojeda charging in for a possible bunt, but was tagged out in a rundown after Ojeda retreated back toward the bag.

"I don't know what he was thinking," Dodgers manager Joe Torre said. "We had some good momentum going and that play just took the wind out of our sails."

Russell Martin worked the count to 2-2 before second base umpire Tim Tschida signaled balk after some frantic gyrations by Blake and Dodgers third base coach Larry Bowa. Blake removed his helmet and jogged home.

"I saw what he did," Arizona manager A.J. Hinch said. "He flinched, both of his legs buckled, and he balked. It was pretty plain and simple to see, so I didn't talk to anybody."

Jonathan Broxton (3-0) pitched the ninth to earn the victory. Starter Chad Billingsley was watching the game in the video room when he saw Vasquez's balk.

"That was quite a ninth inning and quite a way to win the game," he said.

Vasquez (0-1) took the loss. The last-place Diamondbacks dropped their season-high eighth in a row.

"This team sorely needs a win, and losing this way is just excruciating," Hinch said.

The last time a game was won on a balk was Sept. 9, 2008, when Taylor Buccholz of Colorado balked in Kelly Johnson of Atlanta in the 10th inning, according to Stats LLC. Johnson is now with the Diamondbacks.

Rodrigo Lopez took a four-hitter and a 4-2 lead into the eighth, when the Dodgers tied the game on a double error by Johnson. He booted a grounder by Andre Ethier in the hole and then threw it past first base, allowing Rafael Furcal, who singled, and Matt Kemp, who doubled, to score.

"He made an error at a really bad time. He's been very sure-handed and he's done a nice job for us," Hinch said. "It's a killer."

Ethier returned to the Dodgers after missing the previous 15 games because of a broken right pinkie finger. He went 0 for 4 playing with a splint on the finger and a foam pad near the knob of the bat for cushioning.

"It's timing," Torre said. "His rhythm isn't there right now. I thought he was trying to pull the ball a little bit more."

The Diamondbacks got the go-ahead run on second in the ninth with one out against Broxton, but he struck out Adam LaRoche and Chris Young to end the inning.

Justin Upton's two-run homer off Billingsley gave Arizona a 2-0 lead in the first. The ball hit the top of the right field wall and went over.

Arizona added two runs in the second on solo homers by Young and Chris Snyder, with both going into left field.

"I got some fastballs up and they got it in the air and they left the ballpark. You can't do anything about it," Billingsley said. "Even after those two innings, I still knew I had good stuff, so I stayed with my game plan and just kept being aggressive."

Manny Ramirez led off the fourth with his 550th career homer, leaving the Dodgers trailing 4-1. It was his second homer in as many nights and just his second since April 15. The Dodgers' second run came on Kemp's RBI single in the third.

Lopez allowed six hits and four runs in eight innings, while striking out four and walking one.

"We lucked out," Torre said. "Lopez pitched a hell of a ballgame."

Billingsley gave up four runs and six hits in eight innings. He struck out a season-high 11 and walked none. The right-hander was erratic while facing his first 13 batters, a stretch in which he gave up a double and three homers and struck out seven.

Game notes

The Dodgers won via a walk-off balk for just the second time since 1969 and the first since beating the Mets 4-3 on Roger McDowell's 12th-inning balk on May 28, 1989. ... The Dodgers closed the month with a 20-8 record, their second-best May in club history behind the 1962 team's 21-7 mark. ... Ramirez's homer was his 1,813th RBI, moving him past Frank Robinson and into sole possession of 18th place on the career list. ... The Diamondbacks didn't allow any runs in the first inning for the first time since May 26, ending a five-game streak.