A's pitchers walked five batters in the ninth, including Jose Altuve intentionally with a runner at first base, and paid for it when Jake Marisnick tied the game with a sac fly and Dexter Fowler drew a bases-loaded walk to drive in the go-ahead run.
"That was good," said interim manager Tom Lawless, who improved to 4-1 since taking over on Monday. "I felt like we gave them yesterday and we still won today. Credit to the kids. They battled, they didn't give up. We could have folded out tents in the ninth inning. We had good quality at-bats and they struggled throwing strikes in the ninth."
With their sixth win in their last seven games, the Astros (63-80) assured themselves of not losing 100 games for the first time since 2010.
"We're playing relaxed right now and that's a great thing to see," Astros starter Dallas Keuchel said. "Some of these young guys are out proving themselves and having some quality at-bats against some tough relievers over there, and any time you get that it's a breath of fresh air."
Lawless turned to Tony Sipp -- and not Chad Qualls, who has struggled against the A's -- to close out the game in the ninth. Sipp struck out the first two batters he faced before walking Craig Gentry. Josh Fields entered and blew away Josh Donaldson on three pitches for his third save.
"I was trying to attack," Fields said. "It's been a few days since I pitched, about three or four days. After seeing the ninth inning a couple of the A's guys had, that's what I was trying to think about in the 'pen, trying to make sure I'm throwing strikes and not trying to get too fine."
Jose Veras (4-1) pitched 1 1/3 innings in relief for the win.
The Astros went 8-11 against the A's this year, a marked improvement following last year's 4-15 record against Oakland.
"It means a whole lot," Fields said. "They've had our number for most of the year and they played well against us, and we know when we come and play this team, it's going to be some tough games. That team, they can hit the ball and pitch well, and to be able to get two out of three against a team like that, a team that has played so well against us all season, is pretty big for us."
The Astros trailed, 3-2, entering the ninth and loaded the bases with no outs against Ryan Cook, who walked three of four batters he faced. Marisnick tied the game with a sac fly against left-hander Fernando Abad, and -- after Altuve was intentionally walked -- Fowler drew a walk to score pinch-runner L.J. Hoes with the winning run.
"Once ball one came and ball two, we were much more selective and worked counts," Lawless said. "We had some good swings in that inning. We just missed it. We get one good swing on one baseball, we could have had some breathing room. You credit the kids. They battled -- pitching, defense, scratched just enough to win."
A's manager Bob Melvin was asked if he had second thoughts about walking Altuve, who earlier in the game extended his hitting streak to 14 games with his 198th hit of the season.
"Not Altuve," he said. "That's a guy that's just killed us, on top of it against lefties, it's pretty remarkable numbers."
Keuchel still hasn't won since July 30 despite pitching well. He worked 6 2/3 innings Sunday and allowed three runs (two earned) and eight hits while throwing 106 pitches. He's 0-2 with a 3.14 ERA in his last seven starts.
"I'll stay stuck on 10 wins for the rest of the year if we win," said Keuchel, who was 1-0 with a 2.01 ERA in four starts against the A's.
The Astros got RBIs by Jon Singleton and Gregorio Petit in the seventh to take a 2-1 lead, but Nate Freiman hit a two-run homer in the bottom of the inning to give the A's a 3-2 lead. He is 7-for-15 with two homers against Keuchel in his career.
"He swings the bat, and he got good contact on it," Keuchel said. "I thought it was going to go foul but it stayed straight. Nothing really surprises me here."