Updated

Martin Prado had four hits and scored four runs to lead the Arizona Diamondbacks to a 15-5 win against the Pittsburgh Pirates.

Prado blasted his 11th home run and knocked in three runs as well for Arizona, which won for the fourth time in five games.

"This is the beginning of what we should do from now on," Prado said. "Everybody contributed today. We're hoping to have this offense all the way through the end of the season."

Wil Nieves extended his hitting streak to eight games with a pair of hits and three RBI in the victory, while Paul Goldschmidt went 3-for-6 with a three- run homer, his 30th of the season, and two runs scored.

Trevor Cahill (4-10), who was activated from the 15-day disabled list prior to the game, made his first start since June 30 due to a right hip contusion. He picked up his first win since May 17 after giving up four runs on seven hits in five innings.

The Diamondbacks feasted on Pirates All-Star Jeff Locke (9-4). Arizona tagged the lefty for eight runs on 10 hits in 2 2/3 innings.

"Whatever it is you got that day you have to go out and compete with it," Locke said. "Was today a reality check and eye-opener for me? Absolutely."

Pittsburgh's Pedro Alvarez hit a three-run homer, his 30th of the year, in the Pirates' sixth loss in their last eight games.

Arizona got out to an early lead in the first. Prado and Aaron Hill walked around a Goldschmidt single to load the bases with one out. After Matt Davidson struck out, Nieves plated two runners with a double to right.

The Diamondbacks broke the game open with a two-out rally in the third. Nieves and Gerardo Parra picked up back-to-back singles before Didi Gregorius' two- run double to right. Cahill kept the rally going, scoring Gregorius with a single, and A.J. Pollock followed with another base hit before Prado capped the outburst with a three-run blast to left field to open up an 8-0 lead.

The Pirates closed the gap with four runs in bottom half of the third, beginning with Starling Marte's solo homer to left field. Neil Walker and Andrew McCutchen followed with base hits before Alvarez slugged a three-run homer to right to cut Arizona's lead to four.

Pittsburgh picked up another run in the sixth inning when Jose Tabata singled home Russell Martin, who led off with a double. However, the Pirates later stranded the bases loaded.

Arizona put the game away with four more runs in the eighth. Pollock, Prado and Hill singled to load the bases with one out before pinch-hitter Jason Kubel scored two runners with a base hit. Nieves scored Hill with a sac fly and after a Parra single, Gregorius singled home Kubel to make the score 12-5.

Goldschmidt capped the scoring with a three-run homer in the ninth inning after Pollock walked and Prado singled.

Game Notes

The Diamondbacks optioned pitcher Chaz Roe to Triple-A Reno to make room for Cahill on the active roster... Goldschmidt and Alvarez are tied atop the NL with 30 home runs each ... Arizona is 18-11 against the NL Central this season ... Hill went 2-for-4 to extend his hitting streak to 10 games ... Cahill had lost six straight decisions ... Arizona went 8-for-14 with runners in scoring position ... The Pirates have 10 home runs in their last six games ... Prado's home run snapped Pittsburgh's streak of 68 2/3 innings without giving up one.