HOUSTON (AP) — Justin Maxwell hit a two-run double and Matt Dominguez added a two-run single in Houston’s four-run seventh inning as the Astros rallied for a 7-6 victory against the Philadelphia Phillies on Sunday.

Philadelphia lost three of four against Houston to fall 3 1/2 games behind St. Louis and Los Angeles in the National League wild card race.

Carlos Corporan and Scott Moore homered for the Astros, who remained one loss away from reaching 100 for the second straight season.

Wesley Wright (2-2) pitched a scoreless seventh to pick up the win. Wilton Lopez got the last five outs for his sixth save.

Jose Altuve reached on an error by third baseman Michael Martinez to begin the seventh and Jimmy Paredes was walked by Antonio Bastardo (2-5). Pinch hitter Brandon Laird walked off Phillippe Aumont to load the bases with one out.

Maxwell’s double down the right-field line that just found chalk put the Astros ahead 5-4, and Dominguez followed with his two-run single.

After Dominguez moved to second on a passed ball, Justin De Fratus intentionally walked pinch hitter Jason Castro one out later but got Tyler Greene to ground out to end the inning.

Domonic Brown sliced the lead to 7-6 with a two-run double off Mickey Storey in the eighth. Lopez, however, struck out pinch hitter Laynce Nix and got a grounder from Nate Schierholtz to end the inning.

Jimmy Rollins led off the ninth with a single and moved to second on Erik Kratz’s fly ball to right. Lopez got Chase Utley to fly out to left and intentionally walked Ryan Howard before Carlos Ruiz grounded to first to end the game.

Phillies starter Roy Halladay gave up three runs on six hits with seven strikeouts in six innings, remaining two wins shy of 200 for his career.

Jordan Lyles gave up four runs on five hits with four walks and six strikeouts in five innings for Houston. Lyles has gone longer than five innings just once in his last six starts.

Philadelphia scored three runs in the fifth to take a 4-2 lead. Rollins singled with two outs, stole second and moved to third on Corporan’s throwing error. Juan Pierre followed with a run-scoring double to left field.

Lyles intentionally walked Utley, and Howard followed with a a two-run double to left but Howard was thrown out trying to stretch it to a triple.

Corporan’s solo homer in the sixth pulled Houston to 4-3.

Philadelphia took a 1-0 lead in the first on Utley’s sacrifice fly.

Moore’s two-run homer in the third put the Astros ahead 2-1.

NOTES: Houston OF Fernando Martinez was scratched from the lineup and replaced by Paredes in right field. … Altuve was expected to get the day off Sunday but started after INF Jed Lowrie was given the day off due to soreness in his right leg, Houston manager Tony DeFrancesco said. Greene started at shortstop in place of Lowrie. . Philadelphia starts a three-game series Monday at the New York Mets with LHP Cliff Lee starting for the Phillies against RHP R.A. Dickey for the Mets. . Houston starts a three-game series at St. Louis on Tuesday with LHP Fernando Abad going for the Astros against RHP Kyle Lohse.

(© Copyright 2012 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.)