Updated

Justin Maxwell hit a two-run home run to help the Houston Astros survive for a 9-8 win over the St. Louis Cardinals in the opener of a three-game set.

Brian Bogusevic hit a solo home run while Jose Altuve went 4-for-5 with three runs scored for the Astros, who have won two straight following an eight-game losing streak. Lucas Harrell (5-4) got the win as he gave up four runs -- three earned -- on eight hits over six innings.

Matt Adams hit a three-run home run, Rafael Furcal added a two-run shot and Adron Chambers hit a two-run triple for the Cardinals, who have dropped six of seven. Jaime Garcia (3-4) lasted just two innings as he was tagged for six runs on five hits with two walks.

"I'm going to have to get some things looked at because I'm struggling right now," said Garcia. "But I have to more forward if I want to get out of this and scratch out some wins for the team."

Carrying a five-run lead to start the ninth, it wasn't easy for the Astros to close out the game.

David Carpenter started on the mound and promptly gave up a single to Matt Adams. Following a Steven Hill strikeout, Tony Cruz singled and Chambers brought both runners home with a triple.

Brett Myers then took the hill and Furcal greeted him with a shot off the right field foul pole to make it a one-run game. He then got Carlos Beltran to pop out, but walked Matt Holliday to put the go-ahead run at the plate. Allen Craig, though, grounded out and Myers picked up his 14th save of the season.

"Any time you win a game like that it's huge," said Astros manager Brad Mills. "Of course you want to keep the momentum and not have it be so close, but the bats came through for us and Myers locked it down."

Holliday's run-scoring groundout staked the Cardinals to a 1-0 lead in the first inning, but the Astros answered in the bottom of the frame.

Altuve led off with a double, but the next two batters recorded outs. J.D. Martinez, though, kept the inning alive with a single to plate Altuve and the next two batters walked to load the bases. A wild pitch then scored Martinez and Chris Snyder followed with a two-run single for a 4-1 lead.

Maxwell's two-run homer in the second gave Houston a 6-1 advantage.

The Cardinals cut their deficit to two in the third off of Adam's two-out, three-run homer to center, but the Astros got one back in the fourth on Bogusevic's leadoff blast to right.

Houston plated another run in the sixth as Altuve hit a two-out double and scored when Jed Lowrie's bunt back to the mound saw Sam Freeman throw the ball away to first for an 8-4 advantage.

Back-to-back doubles from Chris Johnson and Brett Wallace in the seventh made it a 9-4 contest.

Game Notes

Houston has taken three of four from the Cardinals this season...Garcia had skipped his last start due to elbow discomfort. He fell to 0-5 in seven starts against the Astros...Adam Wainwright pitches for St. Louis on Wednesday while Bud Norris will take the mound for Houston.