Hunter Pence and Pablo Sandoval charged up a pulsating crowd with their shouts and swings, and the San Francisco Giants surged past the Kansas City Royals 11-4 Saturday to tie the World Series at two games apiece.

Down by three runs in the early going and in danger of dropping into a huge hole, the Giants and their fans rallied.

The win ensured the Series will go back to Kansas City to decide the championship. In the meantime, there's Game 5 on Sunday, when postseason ace Madison Bumgarner starts for the Giants against struggling James Shields.

It's a rematch from the opener, when San Francisco rolled 7-1.

The fired-up Pence got three hits, drove in three runs, scored twice and made a terrific catch in the ninth inning. Sandoval delivered a huge, two-run single that he punctuated by tossing his bat several feet.

Nearly lost in the torrent of runs were all sorts of sidelights: the first video challenge in the expanded replay era, an excellent catch by Royals center fielder Jarrod Dyson that kicked up a huge divot, and Giants manager Bruce Bochy throwing his hat in the dugout.

Not to mention another clutch performance in long relief by winning pitcher Yusmeiro Petit.

All the early frustration for the Giants turned into positive energy during a two-run comeback in the fifth that made it 4-all.

Then in the sixth, Sandoval hit a two-run single and Brandon Belt followed with an RBI single as the Giants roughed up postseason darling Brandon Finnegan to surge ahead.

Only a diving catch by Dyson that tore up a divot in the center-field grass prevented San Francisco from getting more. But the Giants soon broke it open with four runs in the seventh.

San Francisco also came out on the winning end of the first World Series replay challenge in the expanded era, when Royals manager Ned Yost asked for another look at a pickoff play at second base.

The real star might've been Petit. He pitched in with three scoreless innings after Ryan Vogelsong got chased in a four-run third that turned on a botched grounder. Petit also got a hit, not bad for a career .049 batter.

Down 4-2, the Giants came back in the fifth. Yost let struggling starter Jason Vargas begin the inning, and rookie Joe Panik led off with a line-drive double.

Jason Frasor was summoned and retired Buster Posey on a grounder. Pence followed with an RBI single up the middle that caused Frasor to throw up his hands in frustration.

Danny Duffy relieved, and a single by Sandoval and a walk to Belt loaded the bases for Juan Perez, whose sacrifice fly made it 4-all.

Pence's RBI grounder gave the Giants a 1-0 lead in the first. Posey had a single in the third for his 21st career postseason RBI, tying Barry Bonds' team record.

The Royals trailed 1-0 when they put runners at the corners with two outs in the third.

Eric Hosmer hit a slow tapper to the right side. Belt ranged far off first base to field it, and quickly looked to see if he could get a forceout at second.

With no play there, Belt whirled around and tried to toss to Vogelsong. But the pitcher didn't get to the bag cleanly, messed up his footwork and had no chance to prevent Hosmer from reaching with a tying single.

Bochy slammed his cap to the dugout floor, seeing an opportunity to end the inning get away.

Giants fans started to grow uneasy when Mike Moustakas walked to load the bases, and there was good reason for concern. Omar Infante followed with a hard, two-run single up the middle and began clapping on his way to first. The hit made him 10 for 15 lifetime against Vargas, and put the Royals ahead 3-1.

After Salvador Perez blooped an RBI single, Bochy had seen enough. He went to the mound to pull Vogelsong, and Belt dropped his head during the pitching change.

Jean Machi walked Dyson, bringing up Vargas.

Earlier in the inning, Vargas hit the Royals' best ball to that point. In his first at-bat since June 2012, the career .262 hitter fouled off a pair of full-count pitches before sending a long flyout to center. A couple of Royals applauded in the dugout for Vargas' solid effort.

This time, with the bases loaded, Vargas ran the count to 2-2. He took another ball, tossed his bat aside and began to jog to first. After several steps, he realized that it was only ball three, froze in a playful stance and returned to the plate.

Leadoff man Alcides Escobar laughed as he handed the bat back to Vargas, who looked at strike three in making his second out of the inning.

Vargas became the first AL pitcher to bat twice in one inning in a World Series game since Luis Tiant for the Boston Red Sox in 1975. Giants pitcher Tim Lincecum did it during the 2010 Series.