St. Louis starter Kyle Lohse reflect on the bench after toiling through 5 2/3 innings in which he allowed seven hits and walked five on 108 pitches. (David J. Phillip/Associated Press)

When fans of the St. Louis Cardinals began to notice, in the top of the second inning Wednesday, that their right fielder was no longer Carlos Beltran, murmurs of concern and confusion swirled around Busch Stadium. Beltran, to that point, had done nothing remarkable or seemingly strenuous. His performance in this postseason — a .414 batting average, hard-hit balls nearly every time up — made him essential to the Cardinals’ chances in the National League Championship Series. Any worry seemed warranted.

Beltran, it turned out, departed with a left knee strain, one suffered as he legged out a double-play ball in his first at-bat. He came into the tunnel behind the dugout, “and he was not doing well,” Cardinals Manager Mike Matheny said. In his spot, Matheny inserted reserve Matt Carpenter, an important bench player but not a seasoned postseason hero like the man he replaced.

“It was just out of nowhere,” Carpenter said.

And in the third inning, Beltran’s spot — now occupied by Carpenter — came up again, and Carpenter delivered the blow that won Game 3. His two-out, two-run homer off San Francisco Giants right-hander Matt Cain was the only offense the Cardinals needed in a 3-1 victory that put them up in the series, two games to one.

“It shows a lot about his character to be ready in that spot,” said Cardinals right-hander Kyle Lohse, who got the win despite allowing 12 base runners in 52 / 3 innings. “He could probably start for anybody, but he has to come off the bench here, and he handles it well.”

The Cardinals took the advantage in the series despite losing Beltran, who will be evaluated prior to Thursday’s Game 4. They took that advantage despite Lohse’s flirt-with-disaster outing, one in which he allowed only one run because the Giants went 0 for 7 with runners in scoring position. And they took that advantage after enduring a 3-hour, 28-minute rain delay in the seventh, one that turned a day game into a night game and inserted a lull into the intensity.

“Sit around, play games on our iPhones,” closer Jason Motte said of how he passed the delay. “Not much.”

Through all that, the pivotal inning started innocently enough. Cain retired the first two hitters in the bottom of the third before Cardinals leadoff man Jon Jay managed a soft liner to left-center that fell in for a hit. Still, one on, two outs in a game the Giants led 1-0, and someone other than Beltran coming to the plate? San Francisco — with Cain, a 16-game winner with a 2.79 ERA during the regular season — had every reason to feel comfortable in the situation.

Carpenter’s postseason career, to that point, consisted of five at-bats, all off the bench. He had one hit.

“He’s just been so versatile, there are times when we’re looking to see how we can get him in there,” Matheny said. “That’s a pretty strong statement with the lineup we have.”

There was one small wrinkle to Carpenter’s appearance Wednesday: He had four previous at-bats against Cain. The results: Four singles. “I can’t explain it,” Carpenter said.

Cain started Carpenter with two off-speed pitches for strikes. The at-bat seemed to belong to the pitcher. “Just trying to battle,” Carpenter said. He took a ball, and Cain somehow lost it for a moment.

For some reason, Cain decided it was important to keep Jay close at first. He threw over, but well wide of first baseman Brandon Belt. Jay took second on the error. Cain had to turn his attention back to Carpenter, with a runner suddenly in scoring position. He missed with a curveball, then came back with a 2-2 slider.

“It got a little of the plate,” Carpenter said, and he crushed it, his first postseason homer.

In that span, the game changed. The Cardinals led 2-1, and no matter how many runners the Giants put on against Lohse, they couldn’t push across any more runs. They stranded two in the second, two in the fourth, two in the sixth and two more in the seventh — after Lohse had departed. They hit into two double plays. Right fielder Hunter Pence, one of the Giants’ best run producers, went 0 for 4, stranding runners three times.

“We had our chances,” said Giants Manager Bruce Bochy, who announced after the game he will start two-time Cy Young award winner Tim Lincecum in Game 4 and lefty Barry Zito in Game 5, replacing Game 1 starter Madison Bumgarner.

“We feel that it’s time to give Madison a little break,” Bochy said.

Lincecum and Zito would do well to turn in the same numbers as Cain. He followed Carpenter’s homer by retiring 11 of the next 12 hitters, and finished with 62 / 3 innings of three-run ball.

But the Giants couldn’t get the big hit, and 30 minutes before the game resumed, Matheny approached Motte. Because the Cardinals used setup man Mitchell Boggs early, Motte would have to pitch the eighth and the ninth.

“Okay, sure,” Motte said. And he did so flawlessly, retiring the six men he faced on 19 pitches. It finished off another stellar, shutout performance from the St. Louis bullpen, and a typical Cardinals’ effort in which the man of the moment was a replacement for someone who’s used to that role.

“Stuff like this can happen,” Carpenter said. It happened to him Wednesday, and he didn’t waste the chance.