SAN DIEGO -- Right-hander Johnny Cueto continued his domination of San Diego, and Hunter Pence and Buster Posey connected on San Francisco's first back-to-back homers of the season as the Giants defeated the Padres 5-3 on Sunday at Petco Park.
The Giants snapped a four-game losing streak.
The Pence and Posey homers capped a five-run, two-inning San Francisco assault of Padres left-hander Clayton Richard, who had opened the season with nine straight scoreless innings. Posey played a role in both rallies.
The catcher walked to open the second, moved to third on Brandon Crawford's single and scored when Chris Marrero became the first Giants left fielder to get a hit this season. Crawford also scored when the throw from Padres right-fielder Hunter Renfroe ricocheted off first baseman Wil Myers into the Padres dugout.
Brandon Belt walked with one out in the third ahead of Pence's 351-foot homer to left. Posey followed with a 362-foot drive to right. It was the first homer of the season for both.
Meanwhile, Cueto, who last season was 3-1 against the Padres with a 1.41 earned run average and three complete games, blanked the Padres for 5 1/3 innings before walking Travis Jankowski in the sixth with one out, ending a string of 11 straight Padres retired.
Myers followed with his second homer of the season, a 354-foot drive to left, to cut the Giants' lead to 5-2. The Padres then loaded the bases, but Cueto got out of the jam by retiring Erick Aybar on a pop out to third.
Cueto, who has both Giants wins this season, worked seven innings and allowed the two runs on five hits and three walks. Cueto (2-0) struck out seven.
Padres cleanup hitter Yangervis Solarte greeted San Francisco right-handed reliever Derek Law with a 346-homer to open the eighth.
Mark Melancon got a game-ending double play to get the save.
Richard (1-1) surrendered five runs (four earned) on five hits in six innings.
NOTES: The Padres placed RHP Trevor Cahill on the 10-day disabled list due to a back injury, and they promoted RHP Zach Lee from Triple-A El Paso. Cahill was scheduled to start Monday against the Rockies in Colorado . . . RHP Hunter Strickland will rejoin the Giants for Monday's home opener after being away from the team on paternity leave.