SAN FRANCISCO -- Wil Myers homered for the third straight game against San Francisco, Jabari Blash hit a go-ahead two-run double in the decisive fourth to back Dinelson Lamet, and the San Diego Padres beat the Giants 5-2 on Sunday.
Lamet (4-4) struck out six pitching into the seventh in his 10th career start and sixth on the road. He has now allowed three or fewer earned runs in six of his outings.
San Diego hit three straight doubles in the fourth and four consecutive hits in all against lefty Ty Blach (6-6), who is yet to beat the Padres in three career starts.
Hector Sanchez added a run-scoring double in the fourth against his former and Cory Spangenberg hit an RBI single.
Myers clobbered a 3-2 pitch for his 20th home run with two outs in the first. The Giants immediately tied it in the bottom half when Buster Posey's RBI single scored Denard Span, who doubled leading off the inning.
Lamet surrendered eight hits and two runs and walked a batter in 6 2/3 innings as the teams finished after nine innings following extra-inning games the previous two days. Brad Hand, San Diego's third reliever, finished with a 1-2-3 ninth for his third save.
Sanchez had a season-best three hits Friday and finished this series 5-for-12 with a home run and three RBIs. He is a career .464 hitter (13 for 28) with five homers and 14 RBIs against San Francisco, which hasn't won a series with the Padres since May 2016.
The Giants had won the past three starts by Blach, who allowed five runs on eight hits in seven innings, struck out seven and walked one after winning his last two decisions.
San Diego has won seven of the last nine meetings in the rivalry, currently featuring the two bottom teams in the NL West.
Padres: 2B Yangervis Solarte, a switch-hitter sidelined by a strained left oblique muscle, is set to begin swinging from the right side Monday. The left side hasn't been a problem. ... RHP Craig Stammen is still two or three days away from pitching after he strained a hamstring, manager Andy Green said. ... OF Travis Jankowski's rehab will be extensive, with him staying with Triple-A El Paso through the month as he nurses a bruised bone in his right foot. ... LF Jose Pirela got a break.
Giants: Closer Mark Melancon threw all of his pitches in a mound session as he works back from a second DL stint with a strained forearm. "Now it's a matter how he comes out of it," manager Bruce Bochy said. Melancon is likely to need another two or three weeks and the Giants have no target date for his return. The reliever could face hitters within a week. ... RHP Johnny Cueto, who landed on the DL with blisters on three fingers, played light catch. ... 2B Joe Panik had a day off.
Padres: LHP Clayton Richard (5-10, 5.35 ERA) faces the Mets owning a 4.17 ERA against New York over his initial seven starts.
Giants: RHP Matt Cain (3-8, 5.49) will try to avoid matching the longest losing streak of his career at eight games - from July 28, 2015-May 10, 2016 - when he pitches the series opener at home against Pittsburgh.