TORONTO — Substitute home plate umpire Chris Segal didn’t throw the three pitches that the Blue Jays hit for homers. That was J.A. Happ serving gopher balls in the first, second and fourth innings.

Nor did Segal strand two runners in the first and leave the bases loaded in the fifth. That was Curtis Maybin striking out and Didi Gregorius smacking a line drive that was snared by a diving shortstop Bo Bichette, who was perfectly positioned on an infield shift.

Yet, it was Segal who commanded the stage Friday night when he ejected Brett Gardner in the fourth inning, wrongly believing the feisty outfielder had been yelling about his strike zone when television cameras had caught Maybin addressing Segal from the Yankees’ dugout with salty language.

When the 8-2 loss was complete, the Yankees’ season-high nine-game winning streak was finished, Gardner was hot and Happ was wondering about bad karma.

“He said he saw me say something. That made me mad because he is a liar,’’ Gardner said of Segal. “I didn’t say anything.’’

Standing at his locker, Happ was at a loss for words to describe his five-inning outing in which he gave up six runs and four hits (three homers). He is tied for the AL lead in homers with 29 in just 120 innings after allowing 27 in 177 ²/₃ innings last year.

“Right now, if it can go wrong it will,’’ said Happ who fell to 9-7 partly due to an early evening dusk sky and pitches he believed were good that got hit over the fence.

Happ gave up a two-run homer to Randal Grichuk in the first and a solo homer to Teoscar Hernandez leading off the second. Mike Tauchman’s fifth homer in as many games for the Yankees cut the lead to 3-1 in the fourth, but then things got weird for Happ.

Brandon Drury doubled with two outs and the bases empty. He broke for third when Happ bounced a pitch that got away from Austin Romine. The catcher’s throw to third resulted in umpire Jim Wolf calling Drury out to end the inning. The Blue Jays challenged the call and it was reversed.

A walk to Derek Fisher didn’t look like trouble when Danny Jansen, the No. 9 hitter, sent up a pop up into foul territory off first base. But DJ LeMahieu, playing first, quickly bailed on the ball because he lost it in the sky. Jansen hit the next pitch over the left-field wall for a three-run homer and a 6-1 lead.

“That is kind of the way it is going,’’ Happ said of the bizarre inning. “Nine hundred, ninety nine times out of a thousand we are out of [the inning]. But it is on me.’’

After Bichette robbed Gregorius to strand three in the fifth, the only remaining Yankees run came on Mike Ford’s opposite-field homer to left starting the seventh.

And when Hernandez took Tommy Kahnle over the left-field wall for a two-run homer in the eighth, the winning streak was finished and Gardner was waiting to unload on Segal. Gardner said the worst part of getting wrongfully booted was that it forced manager Aaron Boone to insert Aaron Judge into the game after attempting to give his right fielder a night off.

“Of course I was mad. The whole thing was [Judge] finally getting a much-needed day off and he has to go in the fourth inning because of what happened,’’ Gardner said. “Just a frustrating night all around.’’

Again, Happ threw the pitches that did the Yankees in. And Judge fortunately didn’t suffer an injury playing in a game because Segal made a colossal mistake. Even if the rabbit-eared Segal had tossed Maybin instead of Gardner, it might have not have made a difference because Maybin went 0-for-4 with four strikeouts.