HOUSTON (AP) — Fernando Rodriguez saw Evan Gattis swing in the seventh inning Saturday night and thought it was a popup.
So much so the Oakland reliever pointed straight up.
"But it just kept carrying," Rodriguez said. "He is a strong guy. It was close."
Not that close. Gattis' drive to right field ended up being a three-run homer that lifted the Houston Astros over the Athletics 10-6 to snap a five-game losing streak.
"That one hurts, because Sonny (Gray) battled five innings after starting off a little shaky, but he gathered (himself) and kept us in the game," Rodriguez said. "To have this happen is tough."
Up to that point, the Athletics had rallied from a 3-0 deficit and led by as many as three runs after the fifth inning.
"The offense wasn't the problem tonight," manager Bob Melvin said. "We swung the bat well, added on and got ourselves a nice lead.
"We just couldn't hold them down at the end; we've had trouble doing that this year."
Jake Smolinski and Marcus Semien each hit a solo homer for the A's. Smolinski finished with two RBIs and two runs, but Rodriguez (4-2) gave up the decisive blow.
"It's a big game for us to win," Gattis said. "I made a baserunning error earlier, and I'm glad I could make up for it."
Houston leads the race for the second AL wild card by 1 1/2 games over the Los Angeles Angels, who swept a doubleheader at Minnesota. The Astros remained 2 1/2 games behind first-place Texas in the AL West.
To manager A.J. Hinch, it was the type of clutch hit — and victory — the Astros needed as they aim to return to the postseason for the first time since 2005. Houston has struggled this month, winning only five of 17 games.
"To go opposite field in the most critical at-bat of the game at that particular point, it woke everybody up," Hinch said. "It gave us the lead and put a lot of belief that we remember how to win games."
Mark Stassi added a solo shot, and Jake Marisnick scored on a sacrifice fly in the eighth for Houston.
For the second consecutive night, the Astros blew a 3-0 lead. With the game tied 3-all and two outs in the fifth, Smolinski doubled off reliever Vince Velasquez to score Semien. Carson Blair hit an RBI single and scored on Craig Gentry's triple to give the A's a 6-3 lead.
Houston began a comeback of its own in the sixth with Luis Valbuena's RBI single off Gray, and Matt Duffy's pinch-hit RBI double off reliever Drew Pomeranz.
Scott Kazmir labored through 3 2-3 innings for his shortest outing in 11 starts with the Astros. He gave up three runs and five hits, including the two homers.
Kazmir was pulled after allowing Mark Canha's tying single with two outs in the fourth.
Chad Qualls (3-4) pitched a scoreless seventh for the win. Astros closer Luke Gregerson, who left the team Wednesday for the birth of his son, returned to pitch a scoreless ninth.
The Astros jumped out to a 3-0 lead in the first with the help of several Oakland miscues. They included a poor route to a fly ball by Smolinski, two wild pitches and three walks by Gray, and an errant throw to third by Blair.
It could have been worse for the A's, but Gattis was thrown out at second trying to advance on a fly ball.
Gray recovered to last 5 1-3 innings, until Valbuena's single scored Colby Rasmus.
"That wasn't a way to start a game, but we fought back and we were able to come back and that was big," Gray said. "I wasn't able to hold us there."
Neither was the bullpen.
ONE TO REMEMBER
Duffy's pinch-hit RBI double in the sixth inning was his first major league hit and came with his father, Ed, in attendance. "That was something I'll never forget," Duffy said, adding that he had the souvenir ball.
STASSI DEDICATES HOMER
Stassi dedicated his first career home run to two cousins, Chari and Andrea, who lost their husbands in recent weeks. "It's been tough at home," Stassi said. "I was playing with a heavy heart."
SHADES OF GRAY
Gray said his struggles on the mound against the Astros came down to command issues. "Look at it," he explained. "I've walked eight guys in the last eight innings. That's an easy answer."
TRAINER'S ROOM
Athletics: OF Billy Burns made his first start since Sept. 9. A tight right hamstring kept him out of the lineup the previous eight games, although he pinch-hit in Friday's 4-3 win.
Astros: OF Carlos Gomez missed his seventh straight game with discomfort in his ribs. He is day to day.
UP NEXT
Astros RHP Collin McHugh (16-7, 4.05 ERA), who is 3-1 in his career against the A's, aims for his third win this month. He will be opposed by Oakland RHP Aaron Brooks (2-3, 7.68), who is 1-3 with a 12.60 ERA in his last six appearances, including five starts.