Pittsburgh Pirates' Starling Marte, left, scores ahead of the tag by San Francisco Giants catcher Buster Posey in the ninth inning of a baseball game in Pittsburgh, Tuesday, May 6, 2014. Marte was called out initially by home plate umpire Quinn Wolcott, but the call was overturned upon review. It was a walk-off triple, and an error, that allowed Marte to score. The Pirates won 2-1. (AP Photo/Gene J. Puskar)

Photo: Gene J. Puskar, Associated Press

Pittsburgh Pirates' Starling Marte, left, scores ahead of the tag...

Image 2 of 5

Pittsburgh Pirates' Starling Marte, left, begins his slide as San Francisco Giants catcher Buster Posey gets the throw during the ninth inning of a baseball game in Pittsburgh, Tuesday, May 6, 2014. Marte was called out but the call was overturned upon review. It was a walk-off triple, and an error, allowing Marte to score. The Pirates won 2-1. (AP Photo/Gene J. Puskar)

Photo: Gene J. Puskar, Associated Press

Pittsburgh Pirates' Starling Marte, left, begins his slide as San...

Image 3 of 5

After a play at the plate Pittsburgh Pirates' Starling Marte, right, turns to umpire Quinn Wolcott who makes the out call in the ninth inning of a baseball game against the San Francisco Giants in Pittsburgh, Tuesday, May 6, 2014. The play was reviewed, the call was reversed, giving Marte a walk-off triple, and an error, that allowed Marte to score. The Pirates won 2-1. (AP Photo/Gene J. Puskar)

Photo: Gene J. Puskar, Associated Press

After a play at the plate Pittsburgh Pirates' Starling Marte,...

Image 4 of 5

PITTSBURGH, PA - MAY 6: Starling Marte #6 celebrates his winning run with Neil Walker #18 and Andrew McCutchen #22 of the Pittsburgh Pirates during the ninth inning against the San Francisco Giants on May 6, 2014 at PNC Park in Pittsburgh, Pennsylvania. (Photo by Joe Sargent/Getty Images)

Photo: Joe Sargent, Getty Images

PITTSBURGH, PA - MAY 6: Starling Marte #6 celebrates his winning...

Image 5 of 5

Starling Marte (left) scores ahead of the tag by Buster Posey with two outs in the bottom of the ninth to win the game. Marte, who tripled and went home on Ehire Adrianza's overthrow of third base, was originally called out, but the call was reversed on replay.

The Giants learned Tuesday night what John McCain, the Confederate Army and the Sony Betamax team all discovered the hard way: Being on the wrong side of history is a real drag.

For the first time, a major-league game ended on a walk-off replay reversal, with the Pirates celebrating a 2-1 victory and the Giants stunned that their six-game winning streak was over because umpires sitting in a New York studio saw something on a video screen that nobody in the San Francisco clubhouse could verify.

After the shortest review among the 12 involving the Giants this year, 1 minute, 14 seconds, the umps ruled that Starling Marte touched home plate with his hand before Buster Posey tagged him on the chest after taking a throw from Pablo Sandoval.

That ended the game with two outs in the ninth and deprived the Giants of extra innings they believe they deserved after they watched the replays.

"As much as I saw it, I don't see where it was conclusive," manager Bruce Bochy said.

Tim Hudson, who threw the game's final pitch and took his second loss after another exceptional start, seemed angry.

"That's the kind of baseball we live in now, I guess," Hudson said. "You never know what the outcome is going to be until you get the final conclusion.

"I've never been a fan of it from the beginning," Hudson said. "We've got to accept all the stuff that comes along. We just happened to be on the wrong end of the call tonight and it cost us a ballgame. It's frustrating.

"It was a close play. I've seen closer plays not turned over."

Marte naturally had a different view. Asked if he liked replay, he smiled and said, "Yeah, sometimes."

Like Monday night's 11-10, 13-inning Giants victory, this one was settled by a throwing error, as Hudson fell one out short of nine innings for the second consecutive start.

The game was a strike away from extra innings when Marte drove a ball toward the short Clemente Wall in right field and nearly had a game-ending home run.

The ball bounced off the wall past Hunter Pence, who had to chase it toward the infield before he retrieved it and threw to second baseman Ehire Adrianza. Bochy said Adrianza should have held the ball with two outs and not risked exactly what happened, an errant throw.

As Marte slid feet-first toward third base, he inadvertently kicked Sandoval's glove, helping prevent Sandoval from stopping the ball. Sandoval, wearing an ice wrap on the hand after the game, felt he would have had it otherwise.

The Giants caught a break when the throw did not bounce into the stands. That would have ended the game automatically. Sandoval quickly retrieved it, set his feet and fired a perfect throw home. Posey straddled the plate with his legs as he caught it and dropped the tag. Umpire Quinn Wolcott immediately signaled "out."

As the Pirates sat glumly in their dugout, manager Clint Hurdle asked for a review. While two umps listened on their headsets, the crowd and Pittsburgh dugout erupted when the replay was shown on the PNC Park video board. Moments later, Gerry Davis removed his headset and made it official.

Safe. Game over.

Posey was incredulous after watching the replay.

"It was really close," he said. "I feel like most of the plays I've seen that could have gone either way stayed the way they were called on the field. I don't know if they saw a different angle, but I don't think so. To me, it was a little inconclusive whether I had my glove on his chest before he had his hand on the plate.

"I was surprised how quickly they overturned it. I figured it must have been a no-brainer. But after seeing it, I'm surprised how fast they overturned it."

The umps in New York saw what they saw, and a game that had been 1-1 since the second inning was over.

"It's a strange feeling," Bochy said. "You get that euphoric feeling when they called him out. A couple of minutes later, it's a downer."

The only bright spot for the Giants was Hudson giving the bullpen a night off after it worked 8 2/3 innings in the barn-burning victory the night before. Not that Hudson cared.

"It's hard to have any satisfaction when you lose a 2-1 game, a game we had a chance of getting into and had a chance to win," he said.

Briefly: Before the game, the Giants optioned reliever Jake Dunning to Triple-A Fresno after one game and recalled right-hander George Kontos, thinking they needed a fresh arm. Kontos had 28 strikeouts in 18 1/3 innings at Fresno. ... Hudson became the first Giants pitcher since Vida Blue in 1981 to start a season with seven starts lasting at least seven innings. Blue extended his streak to nine.