SAN FRANCISCO — With every pitch, Madison Bumgarner etched his place among World Series greats.

The long, tall lefty kept slinging away and put the San Francisco Giants just a win from yet another championship, throwing a four-hitter to beat the Kansas City Royals 5-0 on Sunday night for a 3-2 Series edge.

Hardly menacing on the mound, Bumgarner was simply untouchable — again. As “MVP! MVP!” chants broke out from each packed corner of AT&T Park, Bumgarner finished off the first World Series shutout in 11 years.

“You know what? For some reason, I keep getting really lucky this time of year, so I’ll take it,” Bumgarner said.

It must be more than luck.

By the time the 25-year-old from Hickory, North Carolina, closed out his second win in a week, he had evoked memories of Bob Gibson, Sandy Koufax, Curt Schilling and the top October aces of all-time.

Joined them, and maybe even passed them.

Who else has gone 4-0 in four World Series starts with an 0.29 ERA? Throw in only 12 hits in 31 innings, along with 27 strikeouts, and that adds up to the definition of Big-Game Pitcher.

On this evening, he fanned eight without a walk and never was in trouble. There hadn’t been a shutout in the Series since Josh Beckett’s clinching gem for the Florida Marlins in 2003 at Yankee Stadium.

The Giants’ work isn’t done. To lock up their third crown in five years, they’ll need to win in Kansas City.

“We’re looking forward to getting back to our home crowd, where it’s going to be absolutely wild and crazy,” Royals manager Ned Yost said.

Jake Peavy gets the first chance to seal it for San Francisco when he starts Game 6 at Kauffman Stadium on Tuesday night against rookie Yordano Ventura.

If the Giants don’t win then, there is always this possibility: Bumgarner out of the bullpen in Game 7.

“This guy was right on tonight. He was strong all night,” manager Bruce Bochy said. “You know when this guy is on, it’s fun to watch. I mean, he was hitting his spots, had great stuff.”

Ahead by five, Bochy let Bumgarner bat in the eighth inning.

“Sure, I thought about maybe taking him out, but he was throwing too good,” Bochy said.

Hunter Pence once again was in the middle of things for Giants. He singled off James Shields in the second and scored on a groundout by Brandon Crawford, who had three RBIs.

Later, the enigmatic Pence accidentally threw his bat past the mound while striking out, and appeared to apologize to Shields. Pence had another hit in a three-run eighth, making him 9-for-19 in the five games.

Postseason star Pablo Sandoval also singled twice. Juan Perez broke it open with a two-run double off the top of the center-field fence in the eighth off Wade Davis and scored on a single by Crawford.

Since trailing 4-1 in Game 4, the Giants have responded with 15 straight runs. San Francisco won that game, putting aside concern that Bumgarner should’ve been moved up to pitch on short rest.

Bumgarner won for the fourth time this postseason. This blanking bookended the four-hit shutout he threw at Pittsburgh in the NL wild-card game. Durable, he’s thrown 47.2 innings this October, trailing just Schilling’s 48.1 in 2001 for the most in a single postseason.

Given an early lead, Bumgarner was in control. He surely didn’t need much of a cushion, and looked even better than he did in winning the opener in Kansas City.

And on the rare occasion when the 6-foot-5 Bumgarner made a mistake, failing to cover first base on a grounder to the right side, his defense bailed him out.