Updated

Carlos Ruiz and Michael Young each hit a two-run home run as the Philadelphia Phillies snapped an eight-game losing streak with a 7-3 win over the San Francisco Giants to open a three-game set.

John Mayberry added a pair of RBI and scored a run, while Delmon Young went 2-for-4 with an RBI for the Phillies, who returned home following a disastrous 1-8 road trip.

"It's been a while since we got a win," said Young. "It was nice to get it in front of the home crowd. They came out with some good energy and I think we fed off of that."

John Lannan (3-4) pitched seven innings in the win, giving up three runs on three hits with a pair of walks and three strikeouts.

Barry Zito (4-8) continued to struggle as he gave up four runs on five hits in just 3 1/3 innings. The lefty has not won since May 30 as he is 0-5 in his past 10 starts, and has failed to pitch past the fifth inning in five of those games.

Pablo Sandoval drove in a pair of runs and Joaquin Arias had an RBI for the Giants, who have lost five straight and eight of nine.

"It's been frustrating getting through this tough stretch," said Giants manager Bruce Bochy. "We just can't get that next hit to keep the line moving and get the offense going."

Andres Torres doubled to start the game, moved to third on a sacrifice bunt from Marco Scutaro and came home thanks to a sac fly from Sandoval to give the Giants a 1-0 lead.

The Phils, though, answered in the home half thanks to an RBI single from Delmon Young and a bases-loaded walk from Mayberry to take a 2-1 lead.

San Francisco tied the game in the third on Sandoval's single that scored Torres, but the Phils went back on top in the bottom of the fourth.

Mayberry singled to start the inning, and Ruiz followed with a big blast on a 1-1 fastball into the left-field stands for his first home run of the season and a 4-2 lead.

Michael Young clubbed a two-run home run of his own in the sixth as, after Lannan worked a leadoff walk. He blasted a 2-0 pitch over the left-field wall for a 6-2 lead.

The Giants got one back in the seventh on Arias' run-scoring groundout, but the Phils answered in the home half when Mayberry's double plated Michael Martinez.

Antonio Bastardo and Justin De Fratus each pitched a scoreless inning to close out the game.

Game Notes

The Phils have won three of four from the Giants this season ... Zito is 0-7 in nine road starts this season, and fell to 3-4 lifetime against the Phils in nine games ... Lannan moved to 1-1 in four career starts against the Giants ... The Giants haven't hit a home run in nine straight games.