After getting high-quality starts from rookie pitchers in each of the first three games of a season-ending homestand, the Braves got an even better one Friday from their once-and-again ace, Julio Teheran, who qualifies as a veteran on this youthful staff.

Rookie Daniel Castro drove in two runs with his second homer and first triple, and Teheran pitched six crisp innings against a backup-filled St. Louis Cardinals lineup in a 4-0 series-opening win Friday at Turner Field. It was Braves’ sixth win in seven home games since losing 14 of 15.

Teheran (11-8) allowed five hits and one walk with six strikeouts, and Braves starters have allowed just two runs in 26 innings through four games on a homestand that began with a 2-1 series win against the Washington Nationals.

“I felt really good,” said Teheran, who was 2-1 with a 1.51 ERA in his final six starts. “Everything was working today. I know we were playing the best team in the National League. I was really focused on this game, trying to show up in my last start, and I think I did really good.”

A win Saturday or Sunday against the NL Central champions would give the 95-loss Braves four series wins in their final five, after they dropped eight of the previous nine series. They’ve won eight of 13 games since a mind-numbing 4-26 stretch through Sept. 17.

They took a 2-0 lead with four consecutive one-out hits in the fourth inning off left-hander Jaime Garcia, a sequence that started with Castro’s second homer and ended with A.J. Pierzynski’s RBI double. In between there were singles from Nick Markakis and Adonis Garcia.

Castro, who added an RBI triple in a two-run eighth inning, has two homers in 88 at-bats in the majors, after hitting none in 490 at-bats this season in the minors. Where’d the power come from?

“To be honest with you, I don’t know,” he said through a translator. “The last few games I thought was struggling with the bat, so I was getting here extra early and getting some extra work done with my hitting. It just so happened I got an inside pitch and was able to put the barrel on it. The ball went out. I hit it and just took off running.”

Staked to a 2-0 lead in the third inning, Teheran protected it and finished an impressive late-season run and second-half turnaround. He’ll finish with a 4.04 ERA – easily the highest of his three full seasons — and 171 strikeouts in 200 2/3 innings, but his second half was almost as good as the first half was bad.

He raised some eyebrows by posting a 4.94 ERA and .279 opponents’ average in 16 starts through the end of June. Teheran made an adjustment in his delivery, amped up his aggressiveness, and recorded a 3.23 ERA and .229 OA in his final 17 starts.

“He’s put a nice little run together, and today he pitched out of one hell of a jam, bases loaded and nobody out,” Braves manager Fredi Gonzalez said. “Even the following inning he got himself in a little jam and pitched out of that. He’s pitched well. You know what, we’ve been pitching well here the past seven, eight days. If you pitch well, you have a chance to win a ballgame.”

Teheran struggled mightily on the road in the first half, but pitched well at Turner Field throughout the season, going 8-2 with a 2.89 ERA in 17 home starts. He allowed more than three earned runs only twice at home.

The Cardinals rested their lineup regulars in their first game since clinching the Central Division title with a win in the nightcap of Wednesday’s doubleheader at Pittsburgh, their majors-leading 100th win. They were off Thursday.

“I didn’t know any of those hitters,” said Teheran, who hadn’t faced the Cardinals since 2013. “Me and A.J. were on the same page, I was following him because he knows a lot more than I know. Everything was working today, my changeup, my slider was really good, my fastball was coming out really good.”

Pierzysnski was hit in the left knee by a pitch in the fifth inning and fouled a ball off an ankle in the seventh, but resisted coming out of the game despite a pronounced limp as he headed back to the dugout following a seventh-inning strikeout. He left after the eighth, and Gonzalez said he didn’t know if the 38-year-old catcher would play in the final two games.

“He had enough after the foul ball,” Gonzalez said. “And I didn’t want to run him out there. He took a hit-by-pitch off his left knee, and then the foul ball off his right ankle. He wasn’t moving around too good. I don’t know if we’ll see him the rest of the weekend, but he’s had a terrific year.”

The Cardinals were 0-for-8 with runners in scoring position. During the Braves’ five-game home winning streak that ended Thursday – in which the Braves scored two runs every game — their pitchers held opponents to 2-for-37 with runners in scoring position.

Castro’s home run, a pulled shot to the left-field corner, was the rookie’s second homer, and he added a single in the fourth inning and a run-scoring double in the eighth. He also reached base on an error in the sixth inning.

Castro has played mostly against lefties in a late-season platoon with second baseman Jace Peterson. Gonzalez said they could go into the 2016 season with that arrangement, or Castro could compete for a utility-infield job.

Teheran, after not allowing more than six hits or two runs in any of his five September starts, worked out of several tight spots Friday, including a bases-loaded, no-outs jam in the fifth inning.

After a Brandon Moss single, Tony Cruz double and Peter Kozma walk loaded the bases, Teheran got pinch-hitter John Jay to bounce into a 1-2-3 double play, then struck out Tommy Pham.

The Cardinals also had a runner in scoring position in the first, second and sixth innings after one-out doubles in each case. After Moss doubled and went to third on a passed ball in the second inning, Teheran induced a fielder’s choice grounder to second baseman Castro for the out at home before Kozma lined out to end the inning.

After Randal Grichuk’s double in the sixth, Teheran struck out Matt Adams and got Mark Reynolds on a line-out to center.

Eight of 38 earned runs allowed by Teheran in his last 17 starts came in 4 1/3 innings against the Yankees on Aug. 30. He gave up seven runs in six starts (39 innings) the rest of the way.