Masahiro Tanaka of the Yankees walks back to the dugout...

Masahiro Tanaka of the Yankees walks back to the dugout after getting the last out of the fourth inning against the Blue Jays at Rogers Centre on Tuesday in Toronto. Credit: Getty Images/Tom Szczerbowski

TORONTO — Good streaks and not-so-good streaks have characterized Masahiro Tanaka’s career with the Yankees.

The righthander has had stretches where he’s been as effective, and even dominant, as anyone in the sport, and seen periods where it seemed as if a skipped start or two might be in his best interest to get right.

To their detriment, the Yankees saw a bit of both Tuesday night.

Tanaka threw four scoreless innings before a fifth-inning implosion, which included two Toronto home runs, helped sink him and the Yankees in a 4-3 loss to the Blue Jays in front of 20,671 at Rogers Centre.

“You can’t give up four runs in one inning,” Tanaka said through his translator. Tanaka fell to 3-5 with a 3.42 ERA after allowing four runs and six hits over six innings. “It hurts,” he said.

Tanaka cruised into the fifth with the 2-0 lead provided by Clint Frazier’s two-run homer off Clayton Richard, but stumbled quickly as Randal Grichuk led off with a homer, and Freddy Galvis added a two-run shot later in the inning for the Blue Jays (22-38), who came in having lost six straight and 10 of their last 11.

Tanaka, though with a still-respectable ERA, now has one win in his last eight starts.

“I feel like the momentum isn’t on my side for now,” Tanaka said. “But when you go through a season you go through these type of stretches. So it’s important to just keep on grinding.”

Tanaka was hardly alone in being the culprit Tuesday.

The Yankees (38-21) went 1-for-12 with runners in scoring position and stranded 11, including two apiece in the eighth and ninth innings.

After a rare base-running mistake by DJ LeMahieu helped short-circuit a potential rally in the seventh, Aaron Hicks’ second homer of the season, a towering shot in the eighth, drew the Bombers within 4-3. But they would strand two in the inning as Brett Gardner flied out against Ken Giles, who was called on for a four-out save.

Luke Voit singled off Giles, who entered with a 1.19 ERA, with one out in the ninth and, after Gary Sanchez struck out, Hicks walked. Giles, however, struck out Gleyber Torres for his 11th save.

“Just one of those nights I think,” LeMahieu said of the team’s difficulties with RISP. “We haven’t had too many of those this year. Seemed like when we had the big hits, no one was on base. Just kind of the way it happened.”

LeMahieu was in the middle of a regrettable play in the seventh.

He doubled off Daniel Hudson, making it 44 of 54 games for the second baseman this season in which he’s reached base safely. After Voit struck out, righthander Joe Biagini came on to face Sanchez.

The catcher, who came with an AL-leading 18 homers and 1-for-2 with a walk and a double in the game, fell behind 0-and-2 before hitting a ground smash to Galvis, the shortstop. Galvis, seeing LeMahieu straying a bit off second, fired there, with Sogard tagging him out by an eyelash. Sogard threw a dart to first, clipping Sanchez by a half-step to complete the odd-looking 6-4-3 double play.

“It’s a little bit of a tricky one,” Aaron Boone said. “Obviously not the right read there. A mistake there but one of those as a baserunner can be a little bit gray because you want to do all you can do score if a ball’s going to be in the hole.”

Said LeMahieu: “It was just hit so hard. I think I froze a little bit, maybe I took a step toward third, but it was hit so hard, I think by the time I tried to get back I was too far off.”

More Yankees headlines

Newsday LogoYour Island. Your Community. Your News.Digital AccessOnly 25¢for 5 months