Starling Marte sat on the ground, legs crossed, propped up against the short wall in front of the Pirates dugout. He sipped from a Gatorade cup and was in no hurry to collect his hat and glove for a potential 10th inning, confident that the umpires in the New York-based replay command center would prevent the game from reaching extras.

He was right. The review umpires overturned the call on the field that Marte was the final out at the plate, giving the Pirates a 2-1 win against the San Francisco Giants Tuesday night at PNC Park on a walk-off video review.

"I knew I was safe," Marte said.

Marte came to the plate with the bases empty and two outs in the ninth facing Giants starter Tim Hudson, who was dominant. Marte hit a 1-2 fastball off the Clemente Wall in right field that ricocheted over the head of Hunter Pence.

"When I saw the ball hit the wall, I was going to try to make it to third base," Marte said.

Second baseman Ehire Adrianza relayed the ball to third, but the throw went wide of Pablo Sandoval. Third-base coach Nick Leyva, kneeling near the bag, screamed at Marte to go home.

Marte bolted for the plate. Sandoval recovered the ball and threw home to catcher Buster Posey, who applied the tag to Marte's chest. Home-plate umpire Quinn Wolcott ruled Marte out, but Pirates manager Clint Hurdle, who said he got a thumbs-up from his staff for a challenge, asked for the review.

For 1 minute, 14 seconds, Marte, the rest of the Pirates and 18,881 fans watched the replay on PNC Park's video screen. Ike Davis, who was in the on-deck circle, repeatedly signaled safe. With each additional camera angle, players and fans alike grew more optimistic.