Updated

Brad Peacock pitched into the eighth inning as the Houston Astros survived to take a 3-2 win over the Oakland Athletics in the opener of a four-game set Thursday at O.co Coliseum.

Peacock (4-5) gave up two runs on five hits with a walk and nine strikeouts in seven-plus innings of work to help the Astros to their second straight win.

"I had everything tonight," Peacock said. "This is definitely a confidence builder."

Jose Altuve was 2-for-4 with an RBI while Chris Carter also drove in a run in the win for Houston, which got two hits and a run scored from Trevor Crowe.

Oakland blew its chance to move into sole possession of first place in the AL West as the A's are now a half-game back of idle Texas. The team, though, still sits in the top spot of the wild card chase.

Alberto Callaspo and Stephen Vogt each drove in a run while Sonny Gray (2-3) was charged with three runs -- two earned -- on seven hits over eight innings for the Athletics, who had taken two of three from the Rangers.

"They might not have been hitting the ball hard, but I still wasn't executing my pitches," Gray said of his outing.

In the first, Crowe doubled with two outs and Brett Wallace followed with a walk. Carter then punched a single to center for a 1-0 lead.

Houston padded its lead in the second. L.J. Hoes hit a one-out single and Matt Pagnozzi followed with an infield hit. Altuve then singled to left, easily scoring Hoes and Pagnozzi was able to score as Yoenis Cespedes booted the ball into foul territory for a 3-0 lead.

Oakland didn't mount any serious threats until the eighth inning when Eric Sogard tripled to start the frame. Vogt followed with an RBI-double to chase Peacock from the game.

Kevin Chapman took over and got the next two batters out before Jed Lowrie bunted his way on. Jorge De Leon then took over and a fielder's choice from Callaspo made it a 3-2 game.

Josh Fields then got Cespedes to hit into a fielder's choice to end the frame, and retired the A's in order in the ninth for his third save of the season.

Game Notes

Houston has won just four of the 16 games with Oakland this season ... Peacock is 1-1 over three starts against the Athletics this season ... Houston went 2- for-6 with runners in scoring position and left five men on base, while Oakland was 2-for-8 with RISP and left six on base.