Luis Severino of the Yankees pitches to the Blue Jays...

Luis Severino of the Yankees pitches to the Blue Jays in the first inning during their MLB game at the Rogers Centre on Sunday in Toronto. Credit: Getty Images/Mark Blinch

TORONTO — The Yankees were a sure thing to run their winning streak to 10 and match the best 66-game start in franchise history . . .  until suddenly they weren’t.

With the combination of a rare subpar outing by a rotation member and just-as-rare poor  work from their bullpen, the Yankees blew a five-run lead  Sunday in a 10-9 loss to the Blue Jays in front of 44,395 at Rogers Centre.

The Yankees (49-17) appeared poised for a sweep when they took an 8-3 lead into the bottom of the sixth. But Luis Severino allowed a single and a walk to begin the inning  and Miguel Castro gave up Lourdes Gurriel Jr.’s first career grand slam with two outs to make it 8-7. Wandy Peralta then allowed Teoscar Hernandez’s three-run homer in the seventh, which gave the Blue Jays a 10-8 lead.

“It’s going to happen and it’s a really good offense over there,” Aaron Boone said.  “They had a couple of big swings.”

Severino allowed a two-run homer by Vladimir Guerrero Jr. in the first inning and a two-out solo shot by George Springer in the fifth to account for the Blue Jays' other runs. Toronto had only seven hits but drew eight walks, with four of those being turned into runs on three of the home runs.

Josh Donaldson hit a two-out, two-run homer and Gleyber Torres, Kyle Higashioka, Marwin Gonzalez and pinch hitter Anthony Rizzo had solo shots for the Yankees. Higashioka and Gonzalez went back-to-back in the sixth to begin Max Castillo's major-league debut, giving the Yankees an 8-3 lead.

Yankees relievers entered the day with a 2.79 ERA  — the second-lowest mark in the majors, trailing Houston’s 2.55 — including a 1.16 ERA in the nine-game winning streak.

“This was going to be an easy win, that’s what I thought,” said Severino, who was charged with five runs and allowed three hits and four walks with nine strikeouts in five innings-plus as his ERA rose from 2.80 to 3.27. “But it’s not over until it’s over. They made a great comeback.”

The Yankees, who lead MLB in comeback wins with 19, predictably made it interesting.

After Toronto righty Yimi Garcia picked up his fourth straight strikeout for the first out of the eighth, Boone sent up the lefty-swinging Rizzo to pinch hit. Toronto manager Charlie Montoyo countered by bringing in lefty Tim Mayza and Rizzo swatted a 1-and-1 slider into the second deck in right to bring the Yankees within 10-9. It was his 18th homer of the season, his seventh in his last 15 games and the first of his career as a pinch hitter.

Gonzalez reached on an infield single and Jose Trevino, pinch hitting for Joey Gallo, walked on four pitches. In came closer Jordan Romano, who retired DJ LeMahieu on a fly ball to right and struck out Aaron Judge swinging at a 98-mph fastball.

Romano struck out Donaldson, who was booed throughout by a crowd that cheered him loudly during his 2015 AL MVP season as a Blue Jay, to start the ninth. Giancarlo Stanton walked on four pitches, but Torres, who fell a triple shy of the cycle, flied to center on the first pitch. Aaron Hicks singled and then stole second to put the go-ahead run in scoring position, but  Rizzo grounded out on a full-count slider, giving Romano his 17th save in 19 chances.

“You gotta beat us. They come back with some huge at-bats to grab the lead and then our guys don’t go away,” Boone said. “We get the tying and go-ahead runs there in the ninth. Rizz throws a great at-bat against Romano . . . another great job by the guys of just competing. Even in a game we lost, I’m sure the other side is like, ‘We know we have to beat those guys.’ ”

Said Rizzo: “I think we’ve just continued to prove to ourselves that it doesn’t matter what the situation is in the game, we’re never out of it. We are relentless and we’ll continue to fight to the last out.”

More Yankees headlines