HOUSTON -- Manager Bo Porter attempted to downplay the stress that surely consumed the Houston dugout in the top of the ninth inning Saturday night as Astros relievers Jerome Williams and Raul Valdes labored to slam the door on a white-knuckled, much-needed win.

After Marwin Gonzalez, Jose Altuve and Dexter Fowler sparked a four-run eighth inning with successive base hits against Oakland Athletics left-hander Sean Doolittle, the Astros held on for a 7-6 victory at Minute Maid Park.

Gonzalez and Fowler, both switch-hitters, and the right-handed-hitting Altuve exploited their matchups with Doolittle and so did Astros left-handed-hitting catcher Jason Castro. His RBI single to right field scored Altuve, boosted the lead to 5-3, and chased Doolittle (0-2), who did not record an out while his ERA ballooned to 6.17 after allowing four runs.

"I don't really know (what happened)," Doolittle said. "It was just one of those nights, and that's what's frustrating because I looked at the film and don't have a lot of answers.

"I couldn't get anybody out."

Fowler and Castro later scored on RBI groundouts from George Springer and Marc Krauss, necessary insurance in advance of the Athletics' rally.

Brandon Moss' three-run homer to right off Williams (1-1) cut the deficit to one with no outs. Nick Punto added a single before left-hander Raul Valdes entered two batters later and fanned John Jaso and Jed Lowrie to post his first save and preserve the win for the Astros (8-17).

"I try to keep my emotions intact because, obviously, as the inning is going on your thought process has to stay clear," Porter said. "At the same time I felt like we were going to win the game the whole time.

"When you go to the three-run homer, sometimes it's just good to clear the bases rather than to keep multiple guys on base. We hung in there and Valdes did a good job."

The Athletics (15-9) lost in Houston for just the second time since the start of last season when the Astros moved to the American League.

Initially, Astros left-hander Dallas Keuchel appeared next in line to fall victim to the Athletics' dominance in this series. Oakland sent seven batters to the plate in its first at-bat, with the first two hitters in the order, designated hitter Coco Crisp and catcher Derek Norris, reaching and scoring to give the Athletics a 2-0 lead four batters into the game.

But Keuchel allowed two or fewer runs in each of his previous three starts, and after his rocky first inning, Keuchel found his groove quickly. Aside from Norris' leadoff double in the third, Keuchel retired each batter he faced through the middle of the sixth inning, 15 in total.

"I felt sluggish out of the gate, and that's not really like me," said Keuchel, who allowed three runs on six hits and two walks while fanning six before leaving with one out in the seventh. "You're not going to feel your best every time out. I just felt lucky to get out of the first with just two runs, especially the way they've been swinging the bat."

The Astros delivered a pair of home runs to push into the lead, with Fowler cranking a solo shot in the first inning to shave the deficit in half. In the second, designated hitter Chris Carter followed a Krauss leadoff walk off Athletics right-hander Dan Straily with a 415-foot blast to left field, his third home run, to inch the Astros in from 3-2.

"Eliminate the homers, and I'll be doing just fine," said Straily, who also pitched into the seventh inning and allowed three runs on four hits.

NOTES: Astros RHP Scott Feldman remains on schedule to return from the 15-day disabled list and take his next turn in the rotation on May 4 against the Seattle Mariners after RHP Collin McHugh fills the void for a second time on Sunday against the Athletics. Feldman (right biceps tendinitis) was placed on the DL on April 21, backdated to April 18. ... Astros manager Bo Porter plans on sticking with 2B Jose Altuve atop the order despite the offseason acquisition of Fowler, whose 2,721 career plate appearances include 1,733 batting leadoff. In the eight games since Fowler was dropped to second in the Astros order, he has a .286/.444/.321 slash line with an OPS 180 points higher than when he lead off for 11 games. ... Had the Athletics entered the bottom of the ninth inning Friday night facing a save situation, RHP Jim Johnson would have earned the opportunity. Johnson was removed from the closer role after a poor start to his first season in Oakland, but has worked his way back into the closer-by-committee consideration.