Toronto • There’s a reason Ricky Rubio was open beyond the 3-point line in the last seconds of a close game.

After seven years in the NBA, Rubio is a career 31 percent 3-point shooter. This year, he’s under that figure. So when Kyle Lowry moved to cover the lane to prevent Donovan Mitchell from rolling down into it, he was playing the odds.

The difference with the Jazz (21-28): They’re a team built to pass for the open look. So it was completely natural for the Utah rookie to pass up a look at a huge game-winning shot, and let Rubio take it with five seconds left for an improbable 97-93 victory Friday night in the sold-out Air Canada Centre, where opponents rarely walk away on top.

It was a win built on holding one of the best offensive teams in the NBA under 40 percent shooting, on Mitchell’s 26 points (20 in the second half) and battling back from 12 points down. But what pushed it over the top was unselfishness of the Jazz’s leading scorer, and Rubio — who had not scored in the second half — having the confidence to make it.

“To see your teammates trust in you is a great feeling,” Rubio said. “I’m not afraid of taking those shots and I like those moments.”

Those moments have been paraded in front of the Jazz recently: Seven of their last 13 games have been decided by single digits. The last two have been wins, both on the road where winning has been rare for Utah.

It doesn’t get much tougher than winning in Toronto: The Raptors boasted a 17-3 record going in the game, and with two-and-a-half minutes left and leading by six, they looked bound to prevail again.

But that was before a late Jazz flourish: The team had a putback dunk by Derrick Favors, a Joe Ingles 3-pointer, and two free throws by Mitchell. After DeMar DeRozan missed a pull-up jumper, Mitchell had the ball in his hands. And he made the decision the Jazz trusted him to make.

“Donovan showed, I think, why he’s connected to his teammates by making that pass,” coach Quin Snyder said. “It shows the confidence that he and our group has in Ricky. And Ricky’s mentally tough. He wants those shots, and he got one tonight.”

DeRozan had one more look, a turnaround jumper, after the Jazz got the lead. It missed, which was a problem for Toronto’s backcourt of All-Stars on Friday night: DeRozan and Lowry were a combined 9 for 36 from the floor. Lowry had only five points, which was another facet of the game Snyder attributed to Rubio, thanks to his aggressive defense.

The biggest battle came in the paint: The Jazz had to survive a 28-point, 14-rebound, four-block performance from Raptors center Jonas Valanciunas. While Rudy Gobert countered with his own 18-point, 15-rebound effort, Valanciunas’ true enemy was foul trouble.

When Valanciunas got his fourth foul in the third quarter with 7:36 remaining, he headed to the bench. Against the reserves in the front court (including former Utah Ute Jakob Poeltl), the Jazz went on a 20-9 run up to the start of the fourth quarter. It was a positive flip on officiating after the Jazz were frustrated in the first half to the point of receiving two technicals in a four-minute span.

Utah’s diligent defense on the NBA’s fourth-rated offense seems to be on the crest of a trend: In the five games since Gobert returned from injury, the Jazz have posted the sixth-best defensive rating in the NBA (101.7). It’s also the first time the Jazz have won more than one game on a long road trip.

Gobert said he expects the Jazz to lead the NBA in defensive rating for the rest of the season. And he’s not alone in the locker room in thinking that’s possible.

“We have the pieces to do it — we’ve been saying it all season,” Mitchell said. “Now that we’re starting to fully get back healthy, it’s starting to show what we can do defensively.”

Jazz steal one against the Raptors<br>Donovan Mitchell leads Utah with 26 points.<br>Ricky Rubio has 14 points and the game-winning 3-pointer.<br>Jonas Valanciunas has 28 points and 14 rebounds for Toronto