PHOENIX -- Welington Castillo, Paul Goldschmidt and Nick Ahmed homered for the Arizona Diamondbacks, who cruised to a 12-4 victory over the Los Angeles Dodgers on Friday night.

Ahmed went 4 for 4 with three RBIs, including two doubles and two runs scored. The Diamondbacks won for the third time in four games, with four pitchers combining to hold the Dodgers to four hits.

The last of the four hits was a grand slam by Justin Ruggiano in the top of the ninth inning with two outs.

More from FoxSports

Castillo's towering drive far over the wall in left-center gave Arizona 3-0 lead, and Chris Owings' triple drove in Phil Gosselin with the fourth run of the inning off Dodgers starter Alex Wood.

The Diamondbacks added six runs in the second. Goldschmidt made it 6-0 with a two-run shot down the left-field line. He continues to punish Dodgers' pitching, hitting.336 (91 for 271) with 18 home runs and 59 RBIs in 70 career games against Los Angeles.

Wood (10-10) lasted only 1 2/3 innings, allowing six earned runs and eight hits in his shortest outing since coming to the Dodgers in a trade on July 30.

The other runs in the sixth came on a two-run double by Yasmany Tomas off reliever Pedro Baez and Ahmed's two-run homer. Arizona sent nine batters to the plate in each the first two innings.

Every Arizona position player had at least one hit through the first two innings, and rookie Peter O'Brien collected his first major league hit in the sixth, an RBI single. Starter Robbie Ray (4-11) shut out the Dodgers for five innings for his first win since July 7 and first career win at home, ending a streak of 10 straight starts overall without a victory.

The Dodgers absorbed their worst loss since a 15-2 defeat to the New York Mets on July 25 and their division lead slid to 7 games over the San Francisco Giants in the NL West.

UMPIRE LEAVES GAME

Home plate umpire Jim Wolf left the game after two innings, the result of being hit in the mask by a foul ball off Ahmed's bat. There was a delay before the start of the third inning to allow first base umpire Alan Porter to change into gear and take over behind home plate, leaving a three-man crew.

REMEMBERING 9/11

Two lines of Marines totaling 250 in all stood along the foul lines in left and right field before the game for the national anthem, and both teams wore American flag patches on their caps. A moment of silence was observed before the game in remembrance of the victims of the Sept. 11, 2001 terrorist attacks.

TRAINER'S ROOM

Dodgers: Alex Guerrero, brought in to pinch-hit in the third inning, left the game with what was announced as a left calf strain after beating out an infield single and reaching first base. He was replaced by pinch-runner Jimmy Rollins.

Diamondbacks: RHP Jeremy Hellickson was reinstated from the 15-day DL. He had been out since Aug. 20 with a strained left hamstring, and is in line to start Monday against San Diego at home.

UP NEXT

Dodgers: RHP Mike Bolsinger makes his second big league start since July and goes against his former team, the Diamondbacks, on Saturday. Bolsinger, called up from Triple-A on Sept. 1 after spending the previous month in the minors, is 2-0 with a 2.45 ERA in his last six road starts. He's 6-3 with a 2.97 ERA overall.

Diamondbacks: RHP Rubby De La Rosa is also facing his former team on Saturday. De La Rosa (12-7, 4.41 ERA) took a no-hitter into the fifth inning in his last start, Sept. 6 at the Chicago Cubs.