Updated

Jason Kubel clubbed a pair of home runs and knocked in three overall, as the Arizona Diamondbacks downed the San Diego Padres, 8-5, in the middle test of a three-game set Saturday at Petco Park.

Justin Upton smacked a solo shot among his four hits and Aaron Hill also went deep for the D'backs, who have won three of their last four games.

Wade Miley (15-9) earned the victory after giving up five runs on eight hits and three walks with six strikeouts over 5 1/3 frames.

"The offense did a great job setting the tempo early in the game and they picked me up throughout the night," Miley said.

J.J. Putz struck out the side in the ninth to nail down his 29th save of the season.

Casey Kelly (1-1) was saddled with the loss, giving up six runs on eight hits over 2 1/3 innings.

Logan Forsythe stroked a two-run homer and scored twice, but the Padres saw their three-game winning streak come to an end.

Arizona jumped on top early, as Adam Eaton singled to start the game and Kubel followed two batters later with a two-run blast in right-center field to provide the D'backs with a 2-0 lead.

The Padres answered in the bottom half with a pair of two-out runs. Chris Denorfia and Forsythe each singled to start the frame before Jesus Guzman ripped a two-out double into left field to tie the game.

The D'backs regained their lead in their next at-bat when Upton singled, Chris Johnson doubled and Jake Elmore followed with a groundout to plate Upton for a 3-2 lead.

Hill and Kubel clubbed back-to-back homers to start the third, pressing the margin to 5-2.

Paul Goldschmidt and Upton then smacked singles around a Miguel Montero strikeout to chase Kelly from the contest.

Miles Mikolas entered and flied out Johnson before Elmore followed with a single into left field to score Goldschmidt, but Upton was thrown out at the plate to end the frame with Arizona holding a 6-2 lead.

Forsythe's two-out, two-run blast in the fourth brought the Padres within two, but Upton's two-out, solo shot in the fifth restored Arizona's three-run edge.

In the sixth, Cameron Maybin and pinch-hitter Andy Parrino slapped singles around an Everth Cabrera strike out to mark the end of Miley's outing.

Bryan Shaw entered and served up a double to Denorfia to score Maybin and bring the home team back within two runs.

Montero's bases loaded walk in the eighth scored Gerardo Parra to account for the final margin.

"They got on us early and just stayed on us," San Diego manager Bud Black said. "We fought back a couple different times, but just couldn't come back all the way."

Game Notes

San Diego went 2-for-11 with runners in scoring position and left eight on base ... Arizona finished 1-for-10 with runners in scoring position and stranded 10 ... Kubel's 29 home runs are a career high ... Arizona had lost its last seven meetings with San Diego.