By MICHAEL WAGAMAN, Associated Press

SAN FRANCISCO (AP) — 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.

READ MORE: Computer Problem Extends Deadline To Apply For UC And CSU Schools

Segura and Lamb had three hits apiece. Welington Castillo homered and drove in two runs for Arizona.

READ MORE: Coyote Likely Behind ‘Suspicious’ Animal Deaths In Citrus Heights, Police Say

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.

MORE NEWS: E.G. Daily On 'Rugrat's New Holiday Special "Traditions": 'We Embrace Everyone And Everything'

Copyright 2016 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.