(AP) Josh Donaldson had three hits, including a two-run homer in the sixth inning, and the Oakland Athletics beat the Houston Astros 7-5 on Friday night to move into first in the AL West.
Jed Lowrie added two hits and two RBIs for Oakland, which has won six of eight. Yoenis Cespedes and Nate Freiman had two hits apiece.
The A's grabbed a half-game lead over the Rangers, who lost 6-5 at the Los Angeles Angels.
A.J. Griffin (13-9) gave up four runs over six innings but matched his career high of nine strikeouts to win his third straight decision.
Matt Dominguez drove in a pair of runs for Houston after sitting out the past three games with a sinus infection.
The A's trailed 3-1 and 4-3 before scoring twice in the fourth on Lowrie's RBI single and a groundout by Cespedes.
Donaldson doubled and scored in the third, and then singled and scored in the fourth. But his big blow came in the sixth, a towering drive to center against reliever Phil Humber that gave Oakland a 7-4 lead.
Eight of the A's nine starters had at least one hit, and five different players drove in runs.
Sean Doolittle and Ryan Cook combined to retire six batters, and Grant Balfour worked the ninth for his 37th save.
The Astros, who had won three of the previous four games in the season series, got the tying run on base in the ninth after an error by second baseman Eric Sogard allowed Jonathan Villar to score.
Balfour got Jason Castro to ground into a fielder's choice, and then fanned Dominguez to end the game.
It was an appropriate end to the back-and-forth contest.
Houston scored three times in the third to open a 3-1 lead. Dominguez had a two-run single and Jos Altuve also drove in a run with a base hit.
Oakland tied it in the bottom half when Lowrie doubled in Donaldson and scored on Freiman's single.
Villar drove in Brett Wallace with a bunt single in the fourth, putting the Astros back in front. The lead didn't last very long, with Oakland going in front for good in the bottom half.
Houston starter Dallas Keuchel (5-9) struggled in his third start against the A's this season, allowing 10 hits and five runs in just 3 2-3 innings.
He was hurt by his defense.
Left fielder Chris Carter dropped Brandon Moss' routine fly ball in the sixth. First baseman Wallace later dropped a foul ball in the eighth for another error.
NOTES: Villar finished with three hits. ... Houston CF Brandon Barnes was ejected in the sixth inning after arguing with home plate umpire Alan Porter from the Astros' dugout. Barnes appeared to get hit by a pitch from Griffin earlier in the inning but Porter ruled otherwise. Barnes then struck out. ... Jason Castro (right knee) was back in the Houston lineup as the DH after missing three games. Manager Bo Porter did not know when Castro would be able to catch again. ... A's RF Josh Reddick (right wrist) is expected to take batting practice on the field Tuesday in Minnesota. ... Brett Oberholtzer (4-1), coming off Houston's first shutout of the season, takes on Dan Straily (8-7) in the third game of the series.