Updated

Chase Headley went 3-for-3 and smacked one of three San Diego home runs that propelled the Padres to a 6-4 win over the slumping San Francisco Giants and a three-game sweep of their NL West rival.

Alexi Amarista and Nick Hundley each added two-run shots while collecting two hits apiece, with Amarista scoring three times, to help San Diego to its season-high fourth straight victory and first sweep of the defending World Series champions since May 11-13, 2010 in San Francisco.

Jason Marquis (2-2) aided the Padres' cause by holding the Giants to two runs and six hits over 6 2/3 innings, while Huston Street tossed a scoreless ninth to pick up his fifth save of the season.

"I felt like the ball came out the way I wanted," Marquis said of his outing. "A few situations I had to make some pitches and my defense did a good job of helping me out and turning some double plays."

Buster Posey had a two-run homer for San Francisco and Pablo Sandoval finished 4-for-5 with an RBI single in the loss, the fifth in a row for the Giants.

"When you look at the past five games, it could have easily gone our way in all of them," Posey said. "We're playing some tight games and just have to keep on grinding."

Ryan Vogelsong (1-2) served up all three San Diego homers and allowed six runs -- five earned -- over a shaky five innings of work.

Headley began San Diego's power surge by driving a Vogelsong fastball over the center-field wall in the bottom of the opening inning.

After San Francisco drew even with a run in its half of the second, Hundley followed an Amarista single in the bottom of the frame with by socking the first pitch he saw deep into the seats in left to give the Padres a 3-1 lead that they would not relinquish.

Marquis surrendered a second-inning double to Hunter Pence, who later came around on Brandon Crawford's sacrifice fly, then got out of a bases-loaded, one-out jam in the third by inducing a double-play grounder in Pence's next at-bat. The veteran hurler was solid over the remainder of his stint, while getting some additional room to work with some more help from the long ball.

Jedd Gyorko led off the bottom of the fourth with a double, and Amarista extended the margin to 5-1 by turning on a Vogelsong offering for his first homer of the year.

The Giants closed the gap when Angel Pagan drew a walk in the fifth, stole second and came around to score on Sandoval's single up the middle, but managed just one more hit against Marquis. San Diego got that run back an inning later due to a miscue by Posey, whose passed ball with Amarista on third enabled the utilityman to cross the plate for a 6-2 advantage. He had reached on a walk before advancing on a single and a Marquis sacrifice.

San Francisco did put forth a comeback attempt late, however. Sandoval singled off Brad Brach to start the eighth before Posey cranked a homer that barely cleared the right-center field wall. Pence followed with a single to force Padres skipper Bud Black to summon Luke Gregerson, who set down the next two hitters but walked Crawford to put the tying run on.

Andres Torres then hit a sinking liner to right, with the Padres' Chris Denorfia coming up with a diving catch to protect the two-run lead.

Street permitted a two-out single to Sandoval in the ninth, but got Posey to ground out and end the game.

Game Notes

The four-game win streak is San Diego's first since Sept. 9-12 of last season, while its sweep of San Francisco was the first at Petco Park since Apr. 19-21, 2010 ... The Padres totaled just two runs in losing three meetings to the Giants earlier this month, but had 16 in this series ... Vogelsong has now given up seven homers over his last four starts ... Posey's homer extended his hitting streak to nine games, during which he's hit .400 (12-of-30) ... The Padres wore camouflage uniform tops as part of U.S. Coast Guard appreciation day at the stadium.