Carlos Beltran hit two homers to give him 300 for his career and Tim Lincecum ended a three-start winless stretch as the San Francisco Giants beat the San Diego Padres 3-1 on Wednesday to complete a rare sweep in this rivalry.
Beltran homered in the first inning and again in the sixth with a splash hit into McCovey Cove to put the Giants ahead. It marked the slugger's 30th career multihomer game, third this year and first since joining San Francisco in a trade from the Mets on July 28.
Lincecum (13-12) outdueled Mat Latos (7-14) for his first win since beating the Padres on Aug. 24.
The defending World Series champion Giants began the day trailing the first-place Diamondbacks by 8 1/2 games in the NL West. Arizona had a night game at Los Angeles.
San Francisco has its first four-game winning streak since July 9-15.
Lincecum allowed four hits and an unearned run while striking out six and walking two in seven innings as the Giants wrapped up their first winning home series in the last eight sets since taking two of three against Milwaukee from July 22-24. September call-up Hector Sanchez caught Lincecum for the first time.
After Dan Runzler walked pinch-hitter Chris Denorfia to start the eighth, Sergio Romo relieved and retired the side in order. He pumped his fist after striking out Cameron Maybin to end the inning. Santiago Casilla finished with a 1-2-3 ninth for his third save.
San Diego, which dropped its fourth straight this season at AT&T Park and sixth in seven games, was swept in a series of three or more games against the Giants for the first time since Aug. 22-24, 2008. This was San Francisco's first sweep this year since taking three in a row June 24-26 from Cleveland.
It was largely because of Beltran.
The slugger's shot into the water beyond the right-field arcade was the fourth by a Giants player this year, 59th by San Francisco overall and No. 83 in the history of the 12-year-old ballpark. Home run king Barry Bonds has 35 of them.
Beltran also homered over the elevated brick wall in right to tie the game in the first. He went 7 for 12 (.583) with a double, three homers and four RBIs in the series and is batting .520 (13 for 25) with four homers in seven games against San Diego this season.
The Padres had taken a 1-0 lead against Lincecum on Jesus Guzman's two-out RBI double in the top half.
Latos was tagged for seven hits and three runs in seven innings. He struck out eight and walked one.
All-Star third baseman Pablo Sandoval provided a big defensive stop to end the third with Will Venable on third after he stole his 26th base. Sandoval lunged to his left to field Guzman's sharp grounder, then fired to first just in time while throwing from one knee. He chuckled after doing it again on nearly an identical play on Maybin's grounder in the sixth.
NOTES: San Diego is 4-17 in its stretch of 30 straight games against division foes. ... Longtime Padres broadcaster and former New York Yankees 2B Jerry Coleman celebrated his 87th birthday. A retired Marine Lt. Col. and Bay Area native, Coleman worked the radio booth from the fourth through the sixth innings. ... Giants rookie Brandon Belt will play five or six weeks of winter ball in the Dominican Republic to make up for time missed while he was injured this summer. Belt was sidelined after sustaining a hairline fracture in his left wrist when he was hit by a pitch from St. Louis' Trever Miller in June. The team approached Belt last month about going to winter ball. ... All-Star RHP Ryan Vogelsong (10-7) starts Thursday night for the Giants at Colorado while trying to end a five-start losing streak. ... After an off day Thursday, RHP Tim Stauffer starts for the Padres on Friday, looking for his first career win against the Diamondbacks in his fifth start and 11th appearance. ... Lincecum is 54-4 when the Giants score at least three runs for him. ... Romo appeared in all three games in the series.