OAKLAND, Calif. - Danny Valencia homered in the fourth inning and singled in the winning run in the bottom of a wild ninth to lift the Oakland Athletics past the Houston Astros 5-4 on Sunday.

Josh Reddick had two hits and drove in two runs, including the tying run in the ninth, for the A's, who won their third straight and sixth of nine overall.

Colby Rasmus hit a three-run homer in the top of the ninth to give the Astros a 4-3 lead and set off a celebration in the dugout.

The Athletics turned the cheering around with the runs driven in by Reddick and Valencia and they took their teammate-pounding celebration on much of the infield.

Edward Mujica of the Athletics did not record an out in the ninth, giving up singles to Carlos Gomez and Jed Lowrie ahead of Rasmus' blast into the bleachers in right field. Fernando Abad (1-2) relieved and got the three outs for the win.

Luke Gregerson (5-2) took the loss with his fifth blown save in 27 chances.