KANSAS CITY, Mo. -- A giant, indeed.

Madison Bumgarner punctuated a World Series performance for the ages by pitching the San Francisco Giants to their third championship in five years with a 3-2 win over the Kansas City Royals on Wednesday night.

The big left-hander came out of the bullpen to throw five scoreless innings on two days' rest, saving a Series pushed to the limit. And by winning Game 7 on the road, Bumgarner and the Giants succeeded where no team had in 3 1/2 decades.

"I wasn't thinking about innings or pitch count. I was just thinking about getting outs, getting outs, until I couldn't get them anymore and we needed someone else," Bumgarner said in a monotone that made it sound as though he was talking about batting practice.

A two-out misplay in the ninth almost wrecked it for him.

Bumgarner had retired 14 in a row when Alex Gordon sent a drive to centre. The pitcher pointed his glove in the air, thinking it could be the final out, but the ball fell in front of centre fielder Gregor Blanco for a single.

Blanco allowed it to skip past him to the wall, and left fielder Juan Perez kicked the ball before throwing to shortstop Brandon Crawford in short left, holding Gordon at third.

"When it got by him, I had a smile on my face. I thought maybe I could score, but he got to it quickly enough," Gordon said. "I just put my head down and ran, almost fell around second base, was just waiting for Jirsch (third base coach Mike Jirschele) to give me the signal. It was a good hold. He had the ball in plenty of time."

From there, Blanco hoped for the best.

"We just need one more out. We got this. Let's do it," he thought to himself.

Bumgarner, the Series MVP, retired Salvador Perez on a foulout to third baseman Pablo Sandoval near the Giants' dugout. The 25-year-old ace was immediately embraced by catcher Buster Posey, and the rest of the Giants rushed to the mound to join the victory party.

Most of the San Francisco players tossed their gloves high in the air as they ran to the centre of the diamond.

"What a warrior he is, and truly incredible what he did throughout the post-season," Giants manager Bruce Bochy said. "I just told him I just can't believe what he accomplished through all this. He's such a humble guy, and we rode him pretty good."

Three days after throwing 117 pitches in a four-hit shutout to win Game 5, Bumgarner tossed 68 more and dropped his record-low career Series ERA to a minuscule 0.25. He's allowed one run and 14 hits in five outings covering 36 innings.

"Yeah, it was hopeless," Royals manager Ned Yost said.

Bumgarner initially was credited with the win. But nearly an hour after the final out, the official scorers awarded it to Jeremy Affeldt, who was in the game when San Francisco took the lead.

Affeldt pitched 2 1-3 innings of scoreless relief in his longest outing since July 2012. He was helped by the first World Series reversal in the era of expanded replay, which gave the Giants a double play on Eric Hosmer's sharp grounder.

Rookie second baseman Joe Panik made a diving stop and flipped to Crawford with his glove for the relay, a key play that prevented a potential Royals rally.

Bumgarner joined Cincinnati's Rawley Eastwick in 1975 as the only pitchers with at least two wins and a save in a World Series, and the 15-out save set a Fall Classic record.

With it all, Bumgarner etched his place in post-season lore among the likes of Christy Mathewson, Babe Ruth, Sandy Koufax, Bob Gibson, Reggie Jackson, Randy Johnson, Curt Schilling and David Ortiz -- players whose indelible October performances led their team to titles.

Posey expected Bumgarner to throw three innings, then turn over the game to setup man Sergio Romo and closer Santiago Casilla -- who threw four pitches in the entire Series.

"But he just kept rolling," Posey said. "I mean, it's unbelievable."

Consecutive sacrifice flies by Michael Morse and Brandon Crawford put the Giants ahead 2-0 in the second against Jeremy Guthrie, but Tim Hudson gave the lead right back in the bottom half on Gordon's RBI double and Omar Infante's sacrifice fly.

Morse hit a go-ahead single in the fourth on a 99 mph fastball from reliever Kelvin Herrera to break a 2-all tie, and the Giants eked out a battle of bullpens on a night when both starting pitchers made unusually quick exits.

The Giants were dubbed a "Band of Misfits" in 2010 when they beat Texas to win the franchise's first title since 1954 in New York. Two years later, they swept Detroit for another championship.

And this time, they became the second NL team with three titles in a five-year span, matching Stan Musial's St. Louis Cardinals of 1942-46.

Every other year. It's the closest thing to a baseball dynasty in the 21st century.

Home teams had won nine straight Game 7s in the Series since Pittsburgh's victory at Baltimore in 1979, including the Royals' 11-0 rout of St. Louis in 1985. Teams hosting the first two games had won 23 of the last 28 titles, including five in a row. And the Giants had lost all four of their previous World Series pushed to the limit.

But before a pumped-up, blue-and-white-clad crowd of 40,535 that hoped noise and passion could lift the small-market Royals to a title that seemed improbable when Kansas City was languishing two games under .500 in mid-July, the Giants won the second all-wild card World Series, 12 years after losing Game 7 to the Angels in the first.

Hudson and Guthrie combined for 15 outs -- matching the fewest by Game 7 starters. Hudson, at 39, became the oldest Game 7 starter. The 35-year-old Guthrie took the loss.

With his shaggy hair making him look every bit a gunslinger, Bumgarner entered to boos in the bottom of the fifth for his first relief appearance since the 2010 NL playoffs. He coated his long arms with rosin and groomed the pocked-up mound with his spikes.

Bumgarner gave up an opposite-field single to his first batter, Infante, and didn't allow another runner until the ninth. Bumgarner yielded two hits, struck out four and walked none. He pitched 52 2-3 post-season innings, 4 1-3 more than the previous mark set by Schilling for Arizona in 2001, and finished with 270 innings combined, including the regular season.

MadBum became king of SoMa, and from Nob Hill to North Beach, from The Marina to The Mission, San Francisco celebrated another title won by Kung Fu Panda and Hunter Pence.

Pence batted .444 in the Series and Sandoval, a free-agent-to-be playing perhaps his last game for the Giants, finished at .429 following a three-hit night. In an era when pitching and computer-aided defence has supplanted steroids-saturated sluggers, baseball's dominant team established itself in the tech-fueled, boomtown by the Bay.

The Giants, a 20-1 longshot when 2014 odds were first posted a year ago, won their eighth title and third since moving from New York to San Francisco after the 1957 season. They also have won 10 straight post-season rounds, one shy of the record set by the New York Yankees from 1998-01.

Most of it this year was due to Bumgarner.

"He didn't lose a bit of energy. He didn't lose a bit of stuff," injured teammate Matt Cain said. "Sometimes you wonder if he's got a pulse."

THE CORE

Eight players have been on all three Series rosters for the Giants in the past five years: Affeldt, Bumgarner, Casilla, Tim Lincecum, Javier Lopez, Posey, Romo and Sandoval. Cain, a member of the first two title teams, was hurt this October. Before this run, manager John McGraw (1905, '21-'22) was the only Giant with three titles. Bochy became the 10th manager to win three World Series titles -- the other nine are all in the Hall of Fame.