SAN FRANCISCO (AP) -- Wil Myers hit a three-run homer in the top of the 12th inning to send the San Diego Padres past the San Francisco Giants 5-2 on Sunday.
Myers' seventh home run and second in two games came on a 1-0 fastball from reliever George Kontos (0-2). Cory Spangenberg singled against Kontos leading off the inning, and Erick Aybar singled two batters later.
Hector Sanchez, who played parts of five seasons with the Giants, had a pinch-hit, two-run homer off San Francisco closer Mark Melancon in the ninth to send the game to extra innings.
More from FoxSports
Sanchez turned on a 1-1 cut fastball over the heart of the plate for his first home run of the season and third career pinch-hit homer.
It was Melancon's second blown save in seven chances.
Sanchez represented the tying run after shortstop Eduardo Nunez booted Luis Sardinas' leadoff grounder for an error.
Ryan Buchter (2-1) pitched two shutout innings for the Padres. Jose Torres worked a scoreless 12th for his first save.
Melancon's flop followed a full meltdown by the Giants' bullpen Saturday, when the Padres tagged San Francisco relievers for 11 runs in three innings of a 12-4 win that included Myers' three-run homer.
Giants starter Ty Blach pitched seven innings of three-hit ball, retiring 10 of his last 11 batters in his second start for San Francisco since taking injured ace Madison Bumgarner's spot in the rotation. Bumgarner is expected to miss three months with a separated left (pitching) shoulder he sustained in a dirt-bike crash.
The Giants, who were hitting a league-worst .217 against lefties going into Sunday, took a 2-0 lead against southpaw Clayton Richard, who pitched 5 1/3 innings of six-hit ball.
Joe Panik, who was hit by a pitch leading off the fourth, scored on Blach's sacrifice fly. Michael Morse doubled in Hunter Pence in the fifth.
The Padres have won 12 of 16 games against the Giants dating to last season.
San Francisco (9-17) has the National League's worst record and is 39-59 since going into last year's All-Star break 24 games over .500 with the best record in the majors.
Padres: RHP Jarred Cosart, on the disabled list with a hamstring injury, tentatively plans to pitch for Class A Lake Elsinore on a rehab assignment Tuesday, manager Andy Green said. Cosart will throw three innings or about 45-50 pitches.
Giants: RHP Neil Ramirez was designated for assignment and the Giants called up RHP Bryan Morris from Triple-A Sacramento. . CF Denard Span, on the disabled list with a right shoulder injury, tentatively plans to take batting practice in Los Angeles on Monday.
Padres: After an off day, RHP Trevor Cahill (1-2, 4.50 ERA) will pitch the home series opener against Colorado on Tuesday. Cahill is 5-6 with a 4.44 ERA in his career against the Rockies.
Giants: RHP Johnny Cueto (3-1, 5.10) starts the series opener against the Dodgers in Los Angeles on Monday. The two-time All-Star gave up three runs in six innings vs. the Dodgers last week and was 3-1 with a 2.67 ERA against them last season.