Updated

Yasmani Grandal clubbed a go-ahead three-run home run as part of a five-run fourth inning that vaulted the San Diego Padres to a 6-4 victory over the Arizona Diamondbacks in the middle test of a three- game set at Petco Park.

Grandal's first home run of the season made a winner out of Jason Marquis (9-2), who yielded three runs on three hits and four walks over 6 2/3 frames to notch his eighth straight positive decision.

Huston Street secured his 12th save of the season, despite giving up a run in the ninth.

Kyle Blanks added a solo shot and two runs scored, while Logan Forsythe and Chase Headley each knocked in a run for the Padres, who have won five straight games to reach the .500 mark for the first time this season.

"It was a goal, but the end goal is obviously to win as many games as possible and get to the playoffs," Marquis said of hitting the .500 mark. "We got to a goal that we wanted to accomplish but it doesn't stop there."

Wade Miley (4-6) was tagged with the loss after giving up six runs -- one earned -- on six hits and a walk over six innings.

Miguel Montero stroked a two-run homer, while Cliff Pennington and Gerardo Parra each added an RBI in the setback, Arizona's fifth in its last seven games.

Miley held the Padres hitless over the first three frames before the home team broke through in a big way in the fourth.

Everth Cabrera led off with a single and moved to third when Chris Denorfia reached on shortstop Didi Gregorius' fielding error.

Headley then singled to score Cabrera before Blanks' fielder's choice groundout left runners on the corners. Forsythe followed with a sacrifice fly to score Denorfia.

After Jesus Guzman singled, Grandal provided the big blow of the inning, launching a 2-2 slider into the left-field seats to give the Padres a 5-3 lead.

Blanks led off the sixth with his seventh homer of the season to push San Diego's advantage to 6-3.

"After they stung us for five runs, I didn't like our at-bats at all," Arizona manager Kirk Gibson admitted. "We should have rebounded better than that."

Arizona cut into the lead in the ninth against Street, as Pennington ripped a one-out single to short that Cabrera wasn't able to handle.

Pennington moved to second on a wild pitch and found third on a line-out before scoring on Parra's double to right.

Street, though, bounced back by flying out Gregorius to end the game.

Arizona struck first in the opening frame, as Montero followed Paul Goldschmidt's two-out walk with a towering fly ball into the right-field seats to make it 2-0.

The Diamondbacks loaded the bases with one out in the fourth before Pennington's fielder's choice groundout plated another run to push the visitor's lead to 3-0.

Game Notes

Miley has lost all three of his starts against San Diego this season and fell to 1-5 in seven career starts against the Padres ... Marquis hasn't lost since April 22 ... Arizona went 1-for-7 with runners in scoring position and left seven runners on base.