SAN FRANCISCO — Never mind the jagged contour of the right-field wall or the tricky winds off McCovey Cove — the most treacherous part of AT&T Park is the patch of green turf on the infield.

For the Washington Nationals, it seemed to turn into their own Bermuda (grass) Rectangle.

It is where the unexplained and unbelievable happened Tuesday night, as mistakes and miscommunication resulted in the Nationals’ World Series hopes vanishing in a 3-2 loss to the San Francisco Giants, who won this National League division series, three games to one.

The Giants, who are trying to win their third World Series in five years, will face the St. Louis Cardinals in the National League Championship Series. They reached that round by scoring all their runs without the baseball ever leaving the infield — on a walk, a ground out and a wild pitch.

The Giants’ Hunter Pence at the outfield wall, catching a ball hit by the Nationals’ Jayson Werth.

“That’s our way sometimes,” said Manager Bruce Bochy of the Giants, whose team survived the late-season losses of outfielders Angel Pagan and Michael Morse. “We scratch and paw for runs, and we got a break. You take it.”

This series was ultimately defined by all the little things the Giants did and the Nationals did not do, the three San Francisco victories decided by a single run. But what made it memorable was how often the routine turned bizarre — and usually in the infield.

Two of the Giants’ runs on Tuesday came on a rally that was prompted by a get-out-of-jail double-play ball that instead bounced through pitcher Gio Gonzalez’s legs, and a sacrifice bunt that nobody wanted to field, with neither Gonzalez nor third baseman Anthony Rendon picking the ball up in time to make a throw.

It was type of play that pitchers practice daily in spring training — just like the bunt defense that befell Giants pitcher Madison Bumgarner the day before, when his throwing error kick-started the Nationals’ victory.

That miscue served as a prelude to Tuesday’s follies and the series’s most unusual play, which came after the Giants had taken the lead on pitcher Aaron Barrett’s bases-loaded wild pitch in the seventh.

When Barrett tried to intentionally walk Pablo Sandoval to restore the possibility of a double play, he lobbed his attempt over the head of catcher Wilson Ramos. The Nationals finally caught a break: The ball bounced off the backstop, and Ramos fired to Barrett, who tagged Buster Posey out at the plate.

“I don’t know if that was in their playbook, but it worked,” Bochy said.

The Nationals, who had the best record in the National League, were largely neutralized.

Their closer, Drew Storen, could not close out Game 2. And other than Bryce Harper, who drove in four of their nine runs in the series — two scored on an error — and Rendon, their best hitters disappeared. Leadoff hitter Denard Span hit .105 for the series, which was better than the No. 3 and No. 4 hitters — Jayson Werth batted .059, and Adam LaRoche hit .056. Ian Desmond, the No. 5 hitter, hit .167.

And then there was the fielding that betrayed them Tuesday night in front of a more energetic crowd.

“The game, the situation they were in, can make you a little nervous,” said Giants first baseman Brandon Belt, who hit the game-winning, 18th-inning home run in Game 2. “Sometimes it makes you play better and sometimes it gets to you.”

Just as the Giants received a gem from Tim Hudson, who had struggled down the stretch, they received another in the clincher from Ryan Vogelsong, who was winless in five September starts. But he no-hit the Nationals until the fifth inning and was flawless other than when he allowed a single to Desmond and a double to Harper — the only hits and runs he allowed in five and two-thirds innings.

The crowd chanted “Vogey” on his trip back to the dugout, aware that it could be the last time he does so for the Giants, the team that drafted him, traded him away, got him back and revived his career. An unlikely hero of their 2012 World Series team, Vogelsong is now 37 and an impending free agent who floundered down the stretch. But he was splendid in Game 4, his late-tailing fastball and sharp curveball keeping the Nationals in check.

“This place is very special in my heart,” Vogelsong said. “You just try and soak it in as much as you can.”

Vogelsong was lifted after Hunter Pence made the defensive play of the night, and perhaps the series, crashing into the padding on the right-field wall to catch Werth’s drive in the sixth inning.

“Pence made an unbelievable play,” Harper said.

It was Harper who supplied most of the Nationals’ offense. The boisterous young left fielder continued to build on his promising career, driving in both runs, the first with a smart piece of hitting, poking a double down the left-field line that beat the Giants’ shift. Then he blasted a towering home run down the right-field line that landed in McCovey Cove.

It was Harper’s third home run of the series, which he augmented with a pair of fine catches on Monday afternoon. As Harper spoke in the middle of a somber locker room, he reflected on the Nationals’ season and their playoff shortcomings. He noted that the mistakes made by the Nationals were not made by the Giants.

“They play the game the right way,” he said, the little things adding up to a long ride home.

Correction: October 8, 2014

An earlier version of this article misidentified the Nationals pitcher whose wild pitch in the seventh inning skipped to the backstop and led to the Giants’ 3-2 lead. He was Aaron Barrett, not Matt Thornton.