Updated

Jordan Lyles notched his first major league shutout and home run on Sunday, as the Houston Astros eliminated the Milwaukee Brewers from playoff contention with a 7-0 win in the finale of a three-game series.

The Brewers entered Sunday four games behind the Cardinals for the NL's final wild card spot with four to play, meaning a loss or a St. Louis victory would spell the end of their postseason chances. The Cardinals defeated the Washington Nationals, 10-4, later Sunday.

Lyles (5-12), aided by double plays in the first, second and fourth innings, faced the minimum through five. In all, the 21-year-old righty gave up four hits with a walk and three strikeouts.

"He was in total control the whole game," said Astros interim manager Tony DeFrancesco. "He had a little more fire in his eyes."

Fernando Martinez, Jed Lowrie and Matt Dominguez also hit solo homers while Carlos Corporan added a two-run single for the major league-worst Astros, who took two of three in this set.

Mike Fiers (9-10) allowed five runs on six hits over six innings in the loss. The right-hander struck out 10, walked one, and fell to 0-3 in his last four appearances.

Aramis Ramirez, Rickie Weeks, Ryan Braun and Carlos Gomez each singled for the Brewers, who were knocked out of the playoff race despite going 27-12 since Aug. 19.

"We were always realistic about getting back in the playoff race, but we never gave up," said Brewers catcher Jonathan Lucroy. "We were going to go out fighting."

The Astros went on top for good in the third inning when Tyler Greene plated Corporan with a double into the gap in left-center field. Earlier in the frame, Corporan drew a one-out walk and advanced to third when Corey Hart overthrew Weeks at first base on Lyles' bunt up the line.

Martinez extended the advantage an inning later with a two-out, two-strike blast to center and Lyles belted his first career homer an estimated 418 feet in the fifth for a 3-0 lead.

Lowrie and Dominguez went back-to-back to begin the sixth and Corporan's two- out, bases-loaded single capped the scoring in the eighth.

Lyles, meanwhile, stranded Gomez at third base in the sixth, worked around Braun's one-out single in the seventh and tossed a 1-2-3 eighth. He then fanned Braun after Weeks' two-out base hit in the ninth to lock up his first career complete game.

Game Notes

Lyles improved to 2-0 in a pair of career starts against the Brewers ... The Astros have hit back-to-back homers six times this season ... Fiers recorded his third double-digit strikeout performance of the year ... The Brewers won the season series, 9-8.