Updated

Brandon Barnes hit a two-run double as the Houston Astros survived to take a 5-4 win over the Oakland Athletics in the opener of a three-game series.

It nearly turned into an Oakland victory in the ninth as Chris Young ripped an 0-1 pitch with a runner on base that just missed the left field foul pole by inches. The umpires reviewed the play as it appeared that the ball might have nicked the outside of the pole, but the on-field call stood. Young struck out on the next pitch to give Chia-Jen Lo his first career save.

"From our vantage point we couldn't tell, but the reaction from Chris said to me it had to be reviewed," said A's manager Bob Melvin. "All I wanted was for them to take a look and I appreciate that they did."

Jason Castro scored once and drove in a run, while Chris Carter also had an RBI for the Astros, who snapped a six-game losing streak. Jordan Lyles (5-6) gave up one run on five hits with two walks and three strikeouts in seven innings.

"I think it was big," said Astros manager Bo Porter about stopping the streak. "Jordan pitched a great game, offensively we did just enough to win the game."

Yoenis Cespedes went 3-for-4 with a two-run home run for the Athletics, who stayed a game back of Texas for first place in the AL West as the Rangers lost to the Brewers on Tuesday. Bartolo Colon (14-5) dropped his second straight start as he gave up five runs on seven hits in four innings of work.

Houston went on top in the second as Castro walked, Matt Dominguez doubled two batters later and Barnes brought them both home with a double to left for a 2-0 lead.

In the third, the Astros had runners on the corners with one out and pushed one across on a sac fly from Castro. Carter followed with a run-scoring double to left for a 4-0 lead.

Houston pushed another runner across in the fourth as a run-scoring double play off the bat of Jonathan Villar made it a 5-0 contest.

The A's got a run back in the fifth as Josh Donaldson led off with a triple and later scored on a Stephen Vogt double play.

In the eighth, Oakland made it a one-run game. Josh Zeid struck out the first two batters, but Jed Lowrie singled, stole second and later moved to third on a bad pickoff throw from Zeid. Josh Reddick then single to score Lowrie, and Cespedes followed with a line-drive shot over the left field wall to make it a 5-4 contest.

Game Notes

It was only the second win for Houston in 13 games against Oakland this season ... The A's left six men on base ... Colon had beaten the Astros three times this season, but fell to 6-3 lifetime in 10 starts.