World Series MVP Madison Bumgarner pitched five shutout innings of relief as the the San Francisco Giants defeated the Kansas City Royals, 3-2 in Game 7 of the World Series Wednesday night to captured their third title in five seasons and eighth in franchise history.

Bumgarner retired Salvador Perez on a foul pop to third baseman Pablo Sandoval for the final out of the 2014 baseball season with Alex Gordon on third base after center fielder Gregor Blanco misplayed Gordon's two-out single. 

Bumgarner was immediately embraced by catcher Buster Posey, and 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 center of the diamond.

Three days after throwing 117 pitches in a four-hit shutout to win Game 5, Bumgarner threw 68 more and dropped his record-low career Series ERA to a barely visible 0.25.

He joined Arizona ace Randy Johnson (2001) as the only pitchers in the expansion era to win three games in one Series.

Michael Morse broke a 2-2 tie with a fourth-inning RBI single off reliever Kelvin Herrera to drive in Sandoval, who had led off the inning with an two-strike infield single before taking second on a single by Hunter Pence and third on a fly ball by Brandon Belt. Herrera retired the side without further damage, but enough had already been done as Bumgarner retired 15 of the 17 Royals batters he faced. 

Bumgarner started the fifth inning as the third Giants pitcher of the night, replacing Jeremy Affeldt, who had pitched 2.1 scoreless innings in relief of starter Tim Hudson. Hudson was pulled by San Francisco manager Bruce Bochy in the second inning with the game tied at 2-2.

The Giants broke on top in the second inning after loading the bases on two singles and a hit batter. Morse and Brandon Crawford hit back-to-back sacrifice flies to make the score 2-0. 

Kansas City responded in the bottom of the inning, when Billy Butler lead off with a single and scored from first on an RBI double by Alex Gordon. Gordon came home two batters later on a sacrifice fly by Omar Infante, and Alcides Escobar followed with a single that knocked out Hudson. Affeldt retired the next batter, Nori Aoki, on a force play to the shortstop Crawford.

Bumgarner entered to boos in the bottom of the fifth, coated his long arms with rosin and groomed the pocked-up mound with his spikes.

He gave up an opposite-field single to his first batter, Omar Infante, who advanced on a sacrifice. Bumgarner retired Nori Aoki on a liner near the left-field line that was grabbed by Juan Perez, starting over Travis Ishikawa because of his defense. Bumgarner then struck out Lorenzo Cain.

He retired the side in order in the sixth, seven and eighth, increasing his pitch count to 52. With loud chants of "Let's Go Royals!" echoing through Kauffman Stadium, he struck out Eric Hosmer to open the ninth after falling behind 0-2, then retired Billy Butler on a foulout to bring up Gordon.

In all, Bumgarner pitched 52.2 postseason innings, 4.1 more than the previous mark set by Arizona's Curt Schilling in 2001, and finished with 270 innings combined, including the regular season.

Kansas City starter Jeremy Guthrie pitched 3.1 innings before being removed in favor of Herrera. The right-handed fireballer pitched through the sixth inning before giving way to Wade Davis, who threw two scoreless innings of relief. Greg Holland pitched a scoreless ninth for the Royals. 

The Giants became the first visiting team to win a World Series decider since the 1979 Pittsburgh Pirates, while the Royals saw a magical run that included an 8-0 run through the American League playoffs fall one game short. 

The game also featured the first successful manager's challenge after Bochy correctly argued that Eric Hosmer had grounded into a third-inning double play. Hosmer was initially ruled safe by first base umpire Eric Cooper while making a headfirst dive to beat out a double-play relay in the third. But after a review that took 2 minutes, 57 seconds, Hosmer was called out, completing a slick play started by rookie second baseman Joe Panik's dive and glove flip to shortstop Brandon Crawford.

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.

The Associated Press contributed to this report.