New York Yankees' Gleyber Torres celebrates after hitting a home...

New York Yankees' Gleyber Torres celebrates after hitting a home run off Oakland Athletics' Tanner Roark during the seventh inning of a baseball game Thursday, Aug. 22, 2019, in Oakland, Calif. (AP Photo/Ben Margot) Credit: AP/Ben Margot

OAKLAND, Calif. – The World Series Preview hype machine has been appropriately revved up for this weekend’s series at Dodger Stadium.

It is, of course, the Yankees and Dodgers — two iconic franchises who don’t meet all that often and who this season own the best records in their respective leagues. But while those three games will serve to tantalize for what might come in late October, the series preceding it was a cold reminder for the Yankees of the potential pitfalls en route to getting there.

Masahiro Tanaka became the third starter in a row to plunge the Yankees into an early-inning deficit, leading to a 5-3 loss to the A’s, who competed a three-game sweep.

“Over the course of the long season, you’re going to take one in the mouth,” Aaron Boone said afterward. “We just got punched in the mouth right here in Oakland, but we move on and enjoy the challenge of facing a great National League club.”

It was a fourth straight loss for the Yankees (83-46), who lead the Rays by a still-comfortable eight games in the AL East and who desperately want to avoid returning here in the postseason. The Yankees, who got two homers from Gleyber Torres (30th and 31st on the season), fell to 7-17 since 2013 at Oakland Coliseum, a stadium they could see again this October. The A’s (74-53), in the thick of the AL wild-card chase, have won seven of their last eight and are 24-12 since the All-Star break.

The Yankees, who trailed 4-1 after three innings each of the first two games, trailed 5-0 after three Thursday.

Tanaka, 2-0 with a 3.45 ERA over his previous four starts, allowed five runs and eight hits over six innings in falling to 9-7 with a 4.68 ERA. The righthander did finish with three scoreless innings after the rough beginning.

“Obviously, you want to go out there and get the ‘W,’ just to kind of stop the funk that we’re in,” Tanaka said through his interpreter. “It’s on me. I shouldn’t have let that happen in the first inning. That was a bad start for the game. I take responsibility for today’s game.”

Righthander Tanner Roark, entering the game 1-1 with a 2.55 ERA in three starts with the A’s since being acquired from the Reds, allowed two runs and seven hits over 6 1/3 innings.

The Yankees finished with seven hits, three by Torres. The 22-year-old’s solo homer off Roark in the seventh made it 5-2. Torres, who finished a triple shy of the cycle, became the second Yankee with 30 or more homers in his age-22 season or younger, joining Joe DiMaggio, who hit 46 homers in 1937 at the age of 22. Torres’ shot in the ninth off Joakim Soria made it 5-3.

Tanaka immediately got into trouble in a 33-pitch first. Marcus Semien led off by ripping the second pitch he saw, a sinker, to right for a double and Robbie Grossman walked. Tanaka fell behind Matt Chapman 3-and-0, eventually walking him on a full-count fastball to load the bases.

Matt Olson grounded into a 6-4 fielder’s choice to bring in Semien and make it 1-0. With Mark Canha up, a wild pitch moved Olson to second. Canha then banged a 2-and-2 slider to center, the two-run single making it 3-0 and improving the centerfielder to 4-for-8 with four RBIs in the series. Stephen Piscotty singled off Tanaka’s 31st pitch of the inning, but he got Khris Davis to ground into a 1-4-3 inning-ending double play.

“I thought he threw the ball really well after the first inning,” Boone said of Tanaka. “I really thought he buckled down. After that first inning, to be able to give us six [innings] was good.”

More Yankees headlines

ONE-DAY SALE26¢ for 5 6 months