Giancarlo Stanton of the Yankees reacts after hitting a pop-up on...

Giancarlo Stanton of the Yankees reacts after hitting a pop-up on the infield against the Athletics in the top of the ninth inning at RingCentral Coliseum on Saturday in Oakland, Calif. Credit: Getty Images/Thearon W. Henderson

The Yankees’ 13-game winning streak came to an end on a sunny afternoon in Oakland on Saturday in a 3-2 loss to the A’s.

At times, the Yankees played as poorly as they had played well in the previous two weeks, with a run-scoring balk, two errors and a 17-batter stretch in which they failed to get a hit against A’s starter Frankie Montas.

Still, they took it to the last out as scorching-hot Aaron Judge (three of the team’s five hits) smashed a two-run homer with one out in the ninth. But Giancarlo Stanton popped out and Joey Gallo grounded out to end the game and the streak.

It happens, and the loss most likely will end up as a blip in the race to the postseason.

"Just one of those days," Anthony Rizzo said.

And yet . . .

The Yankees lost to a green-and-gold cautionary tale in Oakland. The A’s are the other team to have won 13 in a row this season, with their streak coming in April. Even with that, the A’s would be going home if the postseason began today.

If you don’t play in October, all you get for a long winning streak is a participation trophy. Stick it on the shelf and prepare for a long, cold winter full of what-ifs.

Even with the Yankees’ comfortable AL wild-card lead (again, as it stands today), if they don’t overtake Tampa Bay in the AL East, all they will earn is a home wild-card playoff game against the Red Sox — when a bad few innings can end your season real fast.

The Yankees made three big mistakes in the first three innings as they fell behind 2-0.

First, Aaron Boone wasted his replay challenge with two outs in the second inning. The Yankees asked for a review when Chad Pinder doubled to center and made it just ahead of Judge’s strike to DJ LeMahieu.

LeMahieu signaled to the dugout, which should have been a warning sign: Players are almost universally proved wrong when they tell their dugouts to challenge. Pinder was judged safe again.

"Just thought it was close," Boone said. "Not a slam-dunk for us, but one we thought was worth a challenge."

Pinder scored on Tony Kemp’s single for the first run of the game.

The second mistake was a balk called on Nestor Cortes later in the inning by third base umpire Will Little. Cortes was flagged for stepping toward home as he threw to first on a pickoff attempt, and it allowed a run to score.

Balks can be hard to discern, but Cortes changed direction so suddenly when he saw the runner take off for second that he stumbled off the rubber. That’s a balk.

The lefthander was verbally chastised by plate umpire Tony Randazzo in the fourth when he made a clean pickoff throw to first and immediately spun around and looked at Little.

"The frustration of the game," Cortes said. "[The balk] cost us a run. I mean, right now we would have been tied in the ninth inning."

Cortes started the fourth by giving up a home run to Matt Chapman to make it 3-0. If it was any consolation, Little was having an even worse day.

The bottom of the third started with the Yankees’ third mistake, a bounced throw to first by Rougned Odor on Starling Marte’s leadoff grounder to third. Rizzo, who booted a grounder in the fifth, failed to scoop Odor’s throw and Marte advanced to second.

When Marte tried to steal third, Little called him safe. Replays showed Odor had slapped the tag on Marte before he got to the base. An easy overturn! But the Yankees had no challenges left.

Two batters later, Marte was doubled off third on a line drive to LeMahieu. Little called Marte out. Only problem was Odor was not on the bag when he caught the ball.

The A’s challenged. Another easy overturn! But the replay officials inexplicably ruled that the call stood. A makeup call? Two wrongs making a right? Sure seemed like it.

A’s manager Bob Melvin argued and was ejected. But in the end, his team won the day.

The Yankees had a bad result, one they can easily shake off. Just better not have one like it in the wild-card game, if that’s where they end up. There are no participation trophies for just getting to the wild-card game in these parts.