DETROIT -- For five innings, the Houston Astros were one pitch away from blowing an important game.
Their relievers never gave the Tigers that pitch.
Five Houston relievers threw shutout innings, and the Astros' three early homers held up in a 5-4 victory over Detroit on Tuesday night.
"None of those guys had a margin for error," Houston manager A.J. Hinch said.
Houston maintained a three-game lead over the Oakland Athletics in the AL West.
Jose Altuve homered on the first pitch of the game, and the Astros hit two more homers in the first four innings to go up 5-0.
Houston starter Framber Valdez, though, couldn't maintain that big lead.
Valdez allowed four runs in the bottom of the fourth, including a three-run homer by JaCoby Jones. That ended his night and started a parade from the Houston bullpen.
Hector Rondon gave up two hits in the seventh but got out of the jam, and Collin McHugh and Roberto Osuna retired the last six batters in order. Osuna struck out rookie Christin Stewart to end the game and earn his 17th save in 18 opportunities.
"It's hard to pick which was my favorite reliever of the night, because they all came in and were effective," Hinch said. "The way the game started, I didn't expect a bullpen day, but I looked up and it was suddenly a one-run game."
Jordan Zimmermann (7-7) allowed five runs on six hits in five innings. He walked one and struck out three.
"I just didn't have my best stuff," he said. "My fastball command wasn't there, so my first pitch wasn't where I wanted it and Altuve's a great hitter. It seems like my starts lately have been very good or very bad."
Detroit got four scoreless innings from its bullpen.
"Those guys did a fantastic job of keeping us in the game," Tigers manager Ron Gardenhire said. "They've got so many great arms in their bullpen, though, and we could never get one more big hit."
After Altuve gave Houston the early lead, Tony Kemp hit a two-run homer in the second inning.
Tyler White hit Houston's third homer, a two-run shot into the Astros bullpen with one out in the fourth.
"We try to get runs any way we can," White said. "Altuve starting the game with a homer was an unbelievable way to get us going, and then Kempie came up with a big swing."
The Tigers scored all their runs with two outs in the fourth. With runners on the corners, Dawel Lugo hit what looked like a routine grounder to short, but the ball took a bad hop and went over Carlos Correa's head for an RBI single.
Jones then lined a 3-1 fastball into the left-field stands for his 11th homer of the season.
"I needed to refocus after the bad hop, because that's something I can't control," Valdez said through a translator. "It's just something that happens."
Jones came into the game hitting .183 with 51 strikeouts in his last 40 games but managed five homers during the slump.
"He can always hit a baseball a long way," Gardenhire said. "The problem comes when he tries to hit home runs. That screws him up, and he starts chasing. When he stays in the strike zone, he's a good hitter."
Houston missed a chance to add to its lead in the seventh.
Louis Coleman hit the first two batters, and a passed ball moved the runners to second and third with one out. Gardenhire intentionally walked Correa, loading the bases, and brought in lefty Daniel Stumpf.
Stumpf got Josh Reddick to pop out and was immediately replaced by right-handed Victor Alcantara. Tyler White hit a hard grounder to third and was originally ruled safe after Jeimer Candelario didn't field the ball cleanly. However, a replay review showed the throw beat White to first, ending the inning.
More AP MLB: https://apnews.com/tag/MLB and https://twitter.com/AP-Sports
Athletics' Bob Melvin nabs AL Manager of the Year honors
Oakland Athletics skipper Bob Melvin was named American League Manager of the Year on Tuesday after guiding the team with the lowest Opening Day payroll in baseball to a 97-65 record and its first playoff berth in four years.
Brian Snitker is NL's top manager after leading Braves to East title
After leading the Braves to an unexpected NL East title, Brian Snitker has been named the NL manager of the year.
Did Ohtani deserve Rookie of the Year?
Around the Horn discuss whether Shohei Ohtani deserved Rookie of the Year even though he only played 104 games this season.
MLB to investigate claims of racial discrimination vs. Mariners
MLB said in a statement provided to The Athletic that it will investigate allegations of racial discrimination in the Seattle Mariners organization made by a former employee.
Time for Giants to decide what to do with Madison Bumgarner
Forget nostalgia. With Farhan Zaidi taking over the front office, San Francisco must re-evaluate how the hero of Octobers past fits into the franchise's future.
Phillies manager Gabe Kapler loses Malibu home in Woolsey Fire
Phillies manager Gabe Kapler is thankful his family is safe after his Malibu home was destroyed in the Woolsey Fire that has burned at least 435 buildings and is threatening tens of thousands more.