SAN FRANCISCO — Sparkling defense, a stingy bullpen and just enough timely hitting.

That same winning formula of fundamental baseball put the Kansas City Royals on top in the World Series.

Jeremy Guthrie outpitched fellow Series newcomer Tim Hudson, four Royals relievers combined on four hitless innings and Kansas City beat the San Francisco Giants 3-2 on Friday night for a 2-1 lead in the Fall Classic.

“This is the way our games have gone all year,” said Royals manager Ned Yost, who made several lineup changes that paid off. “I’m getting really good at protecting a one-run lead because a lot of times that’s exactly what we have to deal with.

“But I have the necessary tools to be able to do that. It’s not me doing it. It’s the guys that we put out there that are doing it. We have the type of pitchers in our bullpen that can accomplish that.”

Alex Gordon hit a run-scoring double and Lorenzo Cain made two slick grabs in right field as the Royals backed Guthrie with nifty glove work. All night long, Kansas City looked comfortable playing in the tricky territory at unfamiliar AT&T Park.

Eric Hosmer had a sixth-inning RBI single on the 11th pitch of his at-bat against lefty Javier Lopez. It was the first World Series hit for Hosmer — on his 25th birthday.

Cain drove in the first run with a groundout after Alcides Escobar’s leadoff double in the first.

Game 4 is Saturday night, with right-hander Ryan Vogelsong scheduled to pitch for the Giants against lefty Jason Vargas.

“We’ve got to keep grinding. It’s going to be a tough series,” said Royals center fielder Jarrod Dyson, added to the starting lineup in Game 3.

Yost moved Cain from center field to right in place of Nori Aoki for a defensive boost in the expansive outfield at AT&T Park. Cain chased down Buster Posey’s slicing line drive in the first for a pretty catch from his knees, then snagged Travis Ishikawa’s sinking liner in the second.

Gordon was moved up from sixth to second in the lineup and came through with his RBI double following Escobar’s single in the sixth.

On a night that began with a remembrance of late Hall of Famer Tony Gwynn, Kansas City produced just enough offense even without designated hitter Billy Butler.

The Giants had their six-game home winning streak in the World Series snapped. The unbeaten run dated to the 2002 wild-card club of Barry Bonds and Co. that lost in seven games to the Angels.

The Royals seemed unfazed by the fanfare and tough conditions in improving to 5-0 on the road this postseason. Of the first 56 times the World Series was tied at 1, the Game 3 winner went on to win in 37 of those instances and four of the last five.

A cast of Giants Hall of Famers were celebrated on the field in a star-studded pregame featuring a “Play Ball!” chant by Huey Lewis.

Pinch-hitter Michael Morse hit an RBI double with none out in the sixth to chase Guthrie. Yost turned it over to his fantastic bullpen, and Kelvin Herrera immediately walked Gregor Blanco.

With the hard-throwing Herrera clocking 99 to 101 mph on the radar gun, Joe Panik had a tough time attempting a sacrifice bunt. His high-bouncing grounder still did the trick to advance both runners, and Buster Posey pulled the Giants to 3-2 on a groundout.

The Royals shut down San Francisco the rest of the way.

“I don’t know if there’s a better bullpen, because that seventh, eighth and ninth inning, and you get a tough go when you’re facing those guys,” Giants manager Bruce Bochy said. “Hopefully you get some runs early, but Guthrie did a great job on us.”

Herrera worked 1.1 innings, rookie Brandon Finnegan got two outs in his World Series debut and Wade Davis pitched a 1-2-3 eighth. Greg Holland got three quick outs for the save.

The four hitless innings of relief were the most in the World Series in 22 years.