– The Houston Astros can't find a way to end their slide.

Danny Valencia homered twice, including a go-ahead two-run shot in the eighth inning, to help the Oakland Athletics to a 4-3 victory Friday night that sent the scuffling Astros to their fifth loss in a row.

Houston has fallen 2½ games behind Texas in the AL West after the Rangers swept a four-game series from the Astros this week. The Astros' lead for the second AL wild card fell to a game over the Twins.

"We've found a way, a lot of different ways to just miss or have a couple of tough losses," manager A.J. Hinch said. "That's not how you draw it up. I think that game was ours to win and we didn't do enough to win, which has been the way the week's gone."

Oakland trailed by a run with one out and one on in the eighth when Valencia launched a pitch from Pat Neshek (3-6) into the seats to make it 4-3.

"It's like the worst feeling in the world when you look back," Neshek said. "It's about as mad as I've been on the mound in my life. It's an awful feeling."

Valencia had a solo shot in the fourth inning, his second career multihomer game and the first since 2010, when both he and Neshek played for the Twins.

"I was capitalizing on mistakes, just like any guy in our lineup would have done," Valencia said. "Fortunately for me, I got some hitter's counts. It just felt good that we won and that I came through for the team."

Houston is 4-12 in September. Hinch hopes his team has a short memory and can put this stretch behind it.

"We've picked a rough time to have a stretch where it's been rocky," Hinch said. "The good news is we do have more baseball to play."

The Astros had a 3-0 lead after three innings thanks to two RBI from Jed Lowrie and a home run by Chris Carter.

Josh Reddick and Valencia hit back-to-back homers to start the fourth and cut the lead to 3-2.