SAN FRANCISCO -- Jake Lamb hit a tying homer with two outs in the ninth inning and doubled home an insurance run in the 11th, rallying the Arizona Diamondbacks past the San Francisco Giants 9-7 on Monday night.

Phil Gosselin scored on Jean Segura's go-ahead infield single with two outs in the 11th. Lamb, who homered to right field off closer Santiago Casilla two innings earlier, made it a two-run cushion with his RBI double.

Segura and Lamb had three hits apiece. Welington Castillo homered and drove in two runs for Arizona in a game that ended 9 minutes shy of midnight on the West Coast.

Rubby De La Rosa (1-3), scratched from his scheduled start in this series opener after coming out of the bullpen over the weekend, struck out three for the win.

Brad Ziegler pitched the 11th for his third save this season and 31st consecutive overall - an ongoing franchise record.

Gosselin reached on a leadoff single against Chris Heston (1-1). Gosselin was sacrificed to second and went to third on a wild pitch before Segura hit a high chopper that bounced just under the glove of second baseman Joe Panik behind the pitcher's mound.

Panik homered off Diamondbacks starter Archie Bradley, and Angel Pagan had three hits and two RBIs for the Giants.

San Francisco starter Jake Peavy had a better day at the plate than he did on the mound. The 2007 NL Cy Young Award winner gave up four runs over five innings but scored on a wild pitch and drove in a run with a bases-loaded walk in the fifth.

Bradley walked four and gave up five runs over 4 1/3 innings in his season debut.


Diamondbacks RHP Tyler Wagner pitched two scoreless innings after being called up from Triple-A Reno before the game. OF Socrates Brito was optioned down to make room.


Slumping 3B Matt Duffy was held out of the Giants' starting lineup but came in as a defensive replacement in the eighth.


Giants: INF Ehire Adrianza (broken foot) is being fitted for a cast and will be restricted from baseball activities for five to six weeks. . 3B coach Roberto Kelly was back in his normal spot after leaving Sunday's loss to the Los Angeles Dodgers after getting hit by an errant throw between innings.


Diamondbacks: LHP Robbie Ray (0-1) has allowed four earned runs 12 1/3 innings and takes a 2.92 ERA into Tuesday's start against San Francisco.

Giants: RHP Matt Cain (0-1) has 14 career wins against Arizona but is struggling overall this season with a 6.75 ERA in two starts.