Updated

Houston right-hander Lucas Harrell grew up in Ozark, Mo., a 4-hour drive from St. Louis. So he was well aware of the Cardinals and their rich tradition.

"They've always had guys that can hit the ball," he said.

Harrell, in his second start in his home state, found that out the hard way Wednesday night, giving up home runs to David Freese and Yadier Molina in the Astros' 5-0 loss.

Harrell (10-10) threw well throughout most of the game, but couldn't overcome two early mistakes.

"I felt my stuff was getting better and better later in the game," he said. "I got a lot of weak contact, a lot of ground balls, a lot of strikeouts. There were just a couple situations where I shouldn't have given in and when I did, they hit a couple of home runs."

Harrell allowed five hits and three runs in 5 2-3 innings. He struck out seven and walked one. He gave up three hits through the first five innings and set the side down in order in the fifth.

"I thought he threw the ball well," Houston interim manager Tony DeFrancesco said. "That's a power offense where if you make a mistake, they are going to hurt you."

The Astros are 13-17 when Harrell starts.

Harrell's performance Wednesday was much better than his first start in St. Louis on Aug. 21. He gave up six earned runs in five innings of a 7-0 loss.

St. Louis right-hander Lance Lynn, making his second start since an Aug. 25 demotion, tossed 6 1-3 innings and Freese and Molina both connected for their 20th home run of the season.

The Cardinals, who have won seven straight against Houston, moved two games ahead of the Los Angeles Dodgers in the race for the second wild card in the National League. Milwaukee is 2 1-2 games back.

St. Louis has won three straight for the first time since a four-game streak from Aug. 21-24.

The Cardinals have five players with at least 20 homers for the first time in franchise history. Carlos Beltran (29), Matt Holliday (27) and Allen Craig (21) already hit the milestone.

Lynn (16-7) allowed three hits, struck out five and walked two in a 102-pitch stint. It was his second successive strong effort since posting a 6.56 ERA in five August starts.

"I got away from what I was all about early on in the season," Lynn said. "I got off track, and tried to start nibbling and throwing breaking pitches.

" Now, I'm going right after hitters and it's making all my stuff better."

Lynn is 2-0 with 12 strikeouts, four walks and one earned run in 12 1-3 innings since his return.

Lynn, who leads a talented staff in wins, retired nine straight batters after Jose Altuve's double to start the game. The All-Star was moved from the rotation after an Aug. 24 outing in which he gave up four earned in two innings at Cincinnati. He made six appearances in the bullpen before returning to the rotation last Thursday at the Los Angeles Dodgers. He gave up one run and five hits in six innings of a 2-1 win.

Manager Mike Matheny believes Lynn has returned to the rotation a smarter and more aggressive pitcher.

"He didn't go down to the bullpen and sulk, he tried to make himself better," Matheny said. "I think he learned a lot about his demeanor. He shortened up his mechanics, really tightened everything up."

Molina said Lynn was at his early season form. Lynn was 8-1 through the first two months of the campaign.

"He was outstanding, he was keeping the ball down and he was aggressive," Molina said,

Freese began the Cardinals' two-homer barrage with a two-run homer in the second inning off Harrell, who is winless in six starts.

"They have some guys that can hit the ball and you just want to work hard and try and get through the game," Harrell said.

Craig led off the second with a single to set the stage for Freese's shot. The Cardinals are 16-3 when Freese homers.

Molina homered in the fourth with one out to push St. Louis' lead to 3-0.

The 20 homers for Freese and Molina are both career highs.

"If you are a guy that's trying to solidify himself, that's the number that I think everybody else looks at," Freese said of the 20-HR mark. "It's nice to get to that number. We've got a good number of guys that have 20 or more. It's fun to be a part of."

Molina was pleased to get to the magical plateau.

"I can't lie, it's feels so good," he said.

DeFrancesco was impressed with Molina's game-calling skills as well as his new-found power.

"He's proven that he's one of the best players in the game right now both offensively and defensively," he said.

Jason Motte recorded his 37th save in 44 opportunities. Motte entered the game in the ninth inning with the bases loaded and one out, and ended the game by striking out Chris Synder and Jimmy Paredes. Mitchell Boggs had struck out the side in the eighth on 12 pitches.

The Cardinals tacked on two runs in the eighth on successive hits by Jon Jay, Beltran and Holliday, and a sacrifice fly by Craig.

Altuve has hit safely in 14 of 18 career games against St. Louis with a .375 average (27 of 72) in that stretch.

Notes: St. Louis RHP Jake Westbrook completed a successful bullpen session before the game. Westbrook, who strained a right oblique muscle on Sept 8, will throw again on Friday. He is hoping to rejoin the rotation next week. ... Houston, which has used 11 rookies this season, has the youngest active roster in the majors, averaging 26.3 years of age. ... The Astros are 8-9 in September after rough stretches in August (5-22) and July (3-24). ... Former St. Louis OF Jim Edmonds was in attendance. ... Cardinals LHP Jaime Garcia (4-7, 4.24 ERA) will face Bud Norris (5-12, 4.93) in the series final on Thursday afternoon. Norris is 7-4 with a 2.61 ERA in 14 career starts against St. Louis.