OAKLAND, Calif. — Ricky Nolasco’s best stretch of his career ended with a single to center in the sixth. The Angels right-hander completely unraveled two innings later when he lost his command.

That’s the way it’s been in this frustrating and mostly disappointing season for manager Mike Scioscia’s ballclub.

Joey Wendle hit a go-ahead single during a three-run eighth inning and the Oakland Athletics rallied to beat Los Angeles 3-2 on Tuesday night.

The A’s didn’t have a baserunner until one out in the sixth inning before their first five batters in the eighth reached.

“We were rolling and I let them back in the game,” said Nolasco, who allowed three runs, two hits and two walks with five strikeouts. “At the end of the day we lost, and it’s going to sting.”

Coming off a four-hit shutout against Cincinnati, Nolasco (5-13) retired the first 16 batters against Oakland to extend his streak to 28 consecutive — the equivalent of a perfect game plus an additional out.

The streak ended when Ryon Healy singled to center on a 1-2 pitch in the sixth, but Nolasco recovered and faced one over the minimum through seven before the A’s batted around in the eighth.

Healy hit an RBI single before Wendle lined a hit to right to drive in pinch-runner Arismendy Alcantara and Marcus Semien.

“What made him so strong through the first seven unraveled in the eighth,” Scioscia said. “He was getting ahead of hitters, mixing all his pitches. Ricky is better than his record indicates.”

John Axford (5-4) pitched two innings to get the win. Ryan Madson retired three hitters for his 28th save.

Albert Pujols and Andrelton Simmons had two hits apiece for the Angels, who had their three-game winning streak snapped.

The Angels did all of their scoring off starter Zach Neal (2-5) in the second. Simmons doubled in Mike Trout, and Pujols scored on a sacrifice fly.

Oakland had lost six of seven.

“It really shows a lot of heart in our squad to be able to battle back in the eighth inning,” Healy said. “Our pitching staff did an amazing job all night holding that lineup to two runs. That was a really big win for us.”

Neal allowed two runs over six innings. He struck out five and walked one.

TRAINER’S ROOM

Angels: Matt Shoemaker was released from a Seattle-area hospital following emergency surgery after he was hit in the head by a line drive by the Mariners’ Kyle Seager on Sunday. Shoemaker remained in the Pacific Northwest and could return to Los Angeles on Wednesday.

Athletics: Infielder Alcantara was called up from Class A Stockton before the game. Alcantara, who began the year with the Chicago Cubs, had been in the minors since Aug. 29.

UP NEXT

Angels: RHP Alex Meyer (0-1) makes his Angels debut in the afternoon finale of this three-game series at the Coliseum. Meyer had been in the minors since arriving as part of the Nolasco trade.

Athletics: RHP Jharel Cotton (0-0) will be called up from Triple-A Nashville to make his major league debut Wednesday. Cotton was part of the trade that sent outfielder Josh Reddick to the Dodgers. He’ll be the third pitcher from the Virgin Islands to appear in the majors.