SAN FRANCISCO (AP) — Denard Span scored on Jarrett Parker’s two-out infield single in the 10th inning, lifting the San Francisco Giants to a 5-4 victory over the Arizona Diamondbacks on Saturday night.

Hunter Pence homered, Nick Hundley had three hits and Pablo Sandoval doubled in three at-bats to celebrate his return to the Giants.

READ MORE: Google Sued By DC, 3 States Saying It Invades Users' Privacy

Span led off the 10th with a double off T.J. McFarland (4-4) past Arizona right fielder J.D. Martinez. After Kelby Tomlinson was intentionally walked and Brandon Crawford hit into a double play, Buster Posey was intentionally walked before Parker beat out a grounder to second baseman Adam Rosales as Span crossed the plate.

READ MORE: 2 Injured In Separate Stockton Shootings

David Peralta had three hits and an RBI, Martinez doubled and tripled and Jeff Mathis extended his hitting streak to 11 games for the Diamondbacks.

The Giants trailed 4-0 but scored three times in the seventh capped by Pence’s two-run homer, then tied it in the eighth when Tomlinson came home on Posey’s double-play grounder.

MORE NEWS: Residents Escape Pleasanton House Fire; Neighbors Evacuated

© Copyright 2017 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.