SAN FRANCISCO (AP) Healthy at last, Angel Pagan is thriving batting ninth and giving the Giants consecutive leadoff hitters capable of impacting a game with the bat or on the basepaths.
Pagan drove in two runs, and Hunter Pence hit a home run and sacrifice fly to back Madison Bumgarner's first win since opening day, and San Francisco held on to beat the San Diego Padres 5-4 on Monday night.
''Everything, every work that we put in the offseason, every change that I did, every sacrifice, a lot of sweat, a lot of sacrifice, it's paying off,'' Pagan said. ''I'm very happy to put everything behind me, all the injuries.''
Bumgarner (2-2) struck out nine in 6 2-3 innings to snap a two-start skid with his first victory in four starts since April 4 at Milwaukee.
Pagan had three hits and his two RBIs came with two outs and Buster Posey also homered as the Giants won for the third time in four games following a five-game losing streak.
''It's working right now where he's at,'' manager Bruce Bochy said of Pagan at No. 9. ''I think he likes hitting there. I'm very much aware how much he's doing offensively.''
Pence connected for his fourth home run leading off the fourth to put San Francisco ahead 2-1 and Pagan hit an RBI double four batters later. Pence added a sacrifice fly the next inning. Posey hit his third homer in the seventh.
San Diego pulled within 5-4 in the eighth, getting consecutive RBI singles by Alexei Ramirez and pinch-hitter Brett Wallace against Hunter Strickland. Derek Law allowed a hit then Josh Osich relieved with the tying run on third and go-ahead runner at first and struck out Jemile Weeks. Closer Santiago Casilla entered and struck out pinch-hitter Jose Pirela, then finished for the four-out save. It was his sixth career save of four or more outs. He now has 100 saves in his career.
''Casilla has saved 100 games. He knows what he's doing out there,'' Padres manager Andy Green said.
Bumgarner improved to 6-1 with a 2.69 ERA in 13 home starts against San Diego, including 2-0 with a 0.76 ERA over three outings last year.
San Francisco's top-hitting pitcher, he struck out three times in a game for just the fifth time in his career and first since Sept. 12, 2014, against the Dodgers.
Derek Norris had an RBI double in the sixth for San Diego, which faced San Francisco for the first of 19 matchups this season - including six meetings in May, three more at AT&T Park. Jon Jay singled in a run for the Padres.
Drew Pomeranz (2-2), coming off a career-best 10 strikeouts against the Pirates his last time out, struck out six more over 4 1-3 innings. He allowed three earned runs on seven hits with three walks and a pair of wild pitches.
Pomeranz's 31 strikeouts over his first four starts rank third in Padres history. The most through four starts are 34 by Jake Peavy - a current Giants right-hander not pitching this series - in 2005.
Three plays went to replay review over the final two innings, all of them upheld, including a catch just off the grass by right fielder Matt Kemp that robbed the Giants of an insurance run to end the eighth.
BUMGARNER'S CHEER CREW
Some 200 veterans donning bright yellow hard hats were in the stands among the sellout crowd supporting Bumgarner, many waving yellow towels in the upper deck of left field. The pitcher, in partnership with Carhartt, through his ''Strikeouts for Vets'' campaign is having $500 donated from the work clothes company for every strikeout by the lefty. The money goes to Helmets for Hardhats, a nonprofit group that connects veterans to careers in the building and trade industry.
Padres: LHP Robbie Erlin, on the disabled list with a strained pitching elbow, played catch Sunday and is with the Padres on the road. He will keep progressing by extending his distance on flat ground before getting on a mound.
Giants: RHP reliever Sergio Romo is scheduled to play catch Friday to test his strained pitching elbow that landed him on the DL April 15, retroactive to April 11. ''That is encouraging,'' manager Bruce Bochy said. ''Trying to get these guys back, they're a big part of our pen.'' ... Fellow reliever George Kontos, like Romo dealing with a strained flexor tendon, still must go through the throwing sequence beginning from 60 feet out. Bochy expects him to need another two weeks.
Padres: RHP James Shields (0-3) tries again for his first victory of the year. He is 2-1 with a 2.88 ERA in four career starts facing San Francisco, including three 2015 matchups.
Giants: RHP Johnny Cueto (3-1), coming off his first loss last week to Arizona, has won four of his last five starts against the Padres and going 4-1 with a 2.25 ERA.