OAKLAND, Calif. (AP) -- All that walkoff magic followed by whipped cream-pie celebrations the Oakland Athletics have enjoyed in recent years turned the Astros' way this time.
The big hit was missing, and the A's watched L.J. Hoes connect for a decisive home run with one out in the top of the 12th to send Houston to a 3-2 victory Tuesday night for their first win in four tries at the Coliseum this year.
The baseball-leading A's (61-38) missed several chances to move a season-high 25 games over .500.
"We were in a game. One big swing could have decided it for us," Oakland manager Bob Melvin said.
The Astros also earned their first three-game winning streak against the A's in franchise history.
Oakland has been impressed with the strides made by its AL West opponent. The A's hit plenty of balls hard, only to see Hoes' drive leave the ballpark.
"They're a big league club. They're going to win, they're going to compete," catcher John Jaso said. "I was surprised (it went out). I thought it would hit off the wall."
Hoes connected off Fernando Abad (2-4), but even he didn't know if he had enough on it.
"I didn't think it was going to be a homer, I thought it was going to be a double, to be honest, just the way the ball carries here and it being night time," Hoes said.
Pinch-hitter Jaso hit a two-out single in the 11th, and Jed Lowrie drew a walk from Jose Veras, who was replaced by Darin Downs (2-1).
Jose Altuve hit a one-out single in the 10th and tried to steal second. Initially called safe, Melvin challenged that second baseman Nick Punto tagged him in time. The call was overturned in 1 minute, 3 seconds.
That ended a franchise-record 28 straight steals by Altuve.
Chad Qualls finished for his 11th save in 13 opportunities.
Lowrie tied the game on a sixth-inning sacrifice fly.
Houston's Chris Carter hit a two-run single in the third against his former team and had a pair of doubles. The Astros couldn't capitalize on his two-out double in the eighth off Luke Gregerson.
Oakland's Scott Kazmir, who had won his previous two starts and was going for victory No. 12 on the year, struck out six in seven innings. He allowed seven hits and two runs in a duel of lefty starters.
It was his first start since July 10.
"I wasn't as sharp as I'd like to be," Kazmir said. "It wasn't a matter of rust."
Altuve led off the game with a single up the middle, but center fielder Craig Gentry threw him out at second trying to stretch it for extra bases.
Brett Oberholtzer, making his second start since being recalled from Triple-A Oklahoma City on July 12, remained winless in four starts against the A's, dating to last season. He didn't strike out a batter for the first time in 13 starts this year.
Astros first baseman Jesus Guzman returned after sitting out Sunday's series finale against the White Sox because of back spasms
When Houston last visited the Coliseum in April, Astros manager Bo Porter left the dugout in the third to yell at Lowrie moments after the No. 2 hitter flied out following two inside pitches.
Lowrie said the situation dictated that he try to bunt, and it was too early in the game not to look to score even after the A's scored seven runs in the first and led 8-0 after two.
"I respect the game of baseball, and I will leave it at that," Porter said beforehand. "I know it's completely behind me, it's completely behind our team, and it's not even something I would want to drum back up."
Astros outfielder George Springer missed his second straight game with soreness in his right knee and quadriceps.
NOTES: Gentry stole his 17th and 18th bases in the A's third. ... The game drew 22,908, a strong showing for a weeknight against the Astros. ... Oakland RF Josh Reddick returned from a second stint on the disabled list because of a right knee injury but didn't start. He entered as a pinch-hitter leading off the eighth and stayed in the game. ... A foot issue is keeping Oakland's Stephen Vogt from catching right now. ... A's All-Star 3B Josh Donaldson won the Heart and Hustle Award again. "Those are probably as good of words as you can come up with for him," Melvin said. "He's dirty all the time."