OAKLAND, Calif. (AP) -- Brad Peacock's fastball looked about as steady as it's been all season. The Houston right-hander's off-speed pitches were even better.
Coming off two rough outings, Peacock (4-5) found his rhythm early and never backed off. He carried a shutout into the eighth inning then watched from the dugout as the Astros bullpen survived a late Oakland rally for a 3-2 victory Thursday night.
''He really had his breaking ball working,'' said Houston manager Bo Porter, who was ejected in the eighth inning after arguing a close play at home plate. ''He was able to throw it for strikes even when he got behind. When you're pounding the strike zone with your fastball and then you start to get your breaking ball over, that's a tough combination.''
That it came against his former club didn't seem to matter.
Peacock, part of the offseason trade that sent infielder Jed Lowrie to the A's, was just happy to get a win after getting tagged for nine earned runs over his previous 10 1-3 innings.
''This is definitely a confidence builder,'' said Peacock, who struck out nine and walked one. ''I have a bunch of buddies over there. I'm happy where I am now. I've got an opportunity here.''
Jose Altuve had two hits and drove in a run while Trevor Crowe singled, doubled and scored to help the Astros knock the A's out of first place in the AL West with their third win in the last four games against their division rivals. Oakland had won 11 of the first 12 meetings between the teams.
The A's went into the night tied with Texas for first place but couldn't get much going against Peacock.
He gave up five hits and didn't allow a runner past second base until Eric Sogard's leadoff triple in the eighth. Stephen Vogt followed with an RBI double to end the shutout bid and chase Peacock.
''We let him get too comfortable too early,'' Oakland third baseman Josh Donaldson said. ''The longer the game went, the stronger he got. He really had confidence in his curveball.''
Oakland made its best push once Peacock left, and that's when things got heated.
With Vogt on third following Lowrie's infield single, pinch-hitter Alberto Callaspo hit a short chopper in front of the mound. Reliever Jorge De Leon fielded the ball and flipped it to catcher Matt Pagnozzi, but Vogt slid in under the tag to pull the A's within 3-2.
A furious Porter sprinted out from the dugout and yelled at home plate umpire Mark Ripperger before getting tossed. Porter continued to scream at Ripperger while walking off the field, pausing near the dugout and angrily pointing his finger at the umpire.
''When you slow it down, it looked like the guy was probably safe,'' Porter said. ''The way I saw it from the dugout, it looked like he was clearly out.''
Josh Fields replaced De Leon and recorded the final four outs for his third save.
Chris Carter, who was also included in the deal with Oakland, singled to drive in Houston's first run.
It was a rough night all around for Oakland's hitters. Yoenis Cespedes struck out twice. A's designated hitter Seth Smith fanned three times.
The Astros gave Peacock plenty of support early.
Crowe doubled off Oakland starter Sonny Gray on a softly hit ball into the gap in right center in the first inning. After Brett Wallace walked, Carter singled in Crowe to give Houston a 1-0 lead.
The Astros jumped on Gray (2-3) again with three hits in the second. Altuve singled to drive in L.J. Hoes for a 2-0 lead, and Pagnozzi scored when the ball glanced off Oakland left fielder Cespedes's glove and rolled into the A's bullpen.
''We were a little in-between on a couple of plays and those things end up costing you in close games,'' Oakland manager Bob Melvin said. ''But then (Gray) settled in really nicely, similar to what weve done here recently, which was pitch very well.''
Gray, who pitched eight scoreless innings against the Astros for his first win in the majors on Aug. 15, retired 19 of the final 20 batters he faced. The rookie struck out seven and walked one.
Notes: The ejection was Porter's second of the season. ... Vogt has an eight-game hitting streak. ... The A's activated C Derek Norris from the DL list before the game. Norris had been sidelined with a broken left big toe since Aug. 20. ... Astros C Jason Castro took batting practice but missed his third straight game because of a cyst on his right knee. ... The Astros claimed OF Eric Thames off waivers from Baltimore and sent him to Triple-A Oklahoma City.