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.
Will Harris (4-3) struck out the side in the fifth, allowing one walk, and Joe Smith pitched a perfect sixth.
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.
Astros: Kemp stayed in the game after being hit on the right elbow by a pickoff attempt from Zimmermann. Alex Bregman (leg) and Yuli Gurriel (arm) both needed attention after being hit by Coleman.
The teams finish the three-game series on Wednesday afternoon with Detroit's Daniel Norris (0-3, 5.47 ERA) facing Houston's Gerrit Cole (13-5, 2.86).