After being riddled with injuries for the first two-thirds of the season, the Nets still aren’t completely sure what they are. But snapping the longest winning streak in the NBA showed what they can be.

A Nets team that had struggled against the league’s better teams rose up against its best Wednesday night. They led nearly wire-to-wire in smothering Toronto 101-91, breaking the champions’ 15-game unbeaten streak.

“Our physicality, the things we were missing in the last two games against them, we just raised that. We wanted it bad,” Kenny Atkinson said. “The execution wasn’t perfect, but our will to win was at a super-high level. That’s why we came out with the W.”

There were chants of “The streak is over!” from the 15,823 at Barclays Center, and loud cheers in the locker room that could be heard all the way down the hallway. And the Nets had cause to celebrate this one.

“It’s a great win,” said Jarrett Allen, who had 10 points and a game-high 13 rebounds. “Especially snapping that 15-game win streak, it’s a big mark for us.”

Caris LeVert led the Nets with 20 points. Joe Harris scored 19, while Spencer Dinwiddie added 17 points, nine assists, six rebounds and not a single turnover. But it was defense that led the way.

Caris LeVert goes up for a layup during the Nets' 101-91 win over the Raptors on Wednesday night.
Caris LeVert goes up for a layup during the Nets’ 101-91 win over the Raptors on Wednesday night.Robert Sabo

“Anytime you win on the back of your defense, you feel like you’ve imposed your will on the game, which is something you want to do,” Dinwiddie said. “That’s the mark of a great team. You can impose your will, you can play your style, you make the team adapt to you.”

The Raptors couldn’t adapt. They’d averaged 121.2 points in their club-record streak, shooting .504 overall and .406 from deep. But the Nets’ withering defense put an end to all that, harassing the champs to 37.8 percent from the floor and just 13 of 43 from behind the arc.

“[This] was really a story about our defense,” Atkinson said. “Obviously, offensively we have a ways to go; [but] that looks like our identity right now, if you say pick one thing that the Nets are doing well.”

After coming into last weekend just 5-18 against winning teams — and having dropped six straight against them — defense is leading a turnaround.

The Nets rallied from an 18-point third-quarter hole in Toronto to lose on a missed tip at the buzzer on Saturday. Then came their first road victory over a winning team Monday in Indiana. Wednesday topped that.

“That’s what we need to do every night. That should be our identity,” DeAndre Jordan said. “There are going to be times where we don’t shoot the ball well, offense is not going to be going. But our defense, we can control that.”

The Nets went ahead 4:10 into the game and never trailed again. They led 46-40 with 1:04 left in the half before seizing control.

Kyle Lowry fouled Harris to hand him three free throws, then committed a turnover with a half-minute left. Harris hit a dagger 3, celebrating with a fist pump and giving the Nets a 52-40 halftime lead.

The Nets saw the Raptors get within 10 several times, including at 86-76 midway through the fourth quarter. But after a probing possession, Dinwiddie hit a kiss off the glass. Then he converted a three-point play on the next trip down for a 91-76 edge.

The Nets closed out a fifth straight home win, all by double digits, tying a team record.

“It’s definitely a step in the right direction, especially going to Indiana, getting a win there,” Harris said. “I don’t think we’d beaten any teams over .500 on the road all year, so for us to go on the road and have a big win like that is just good in terms of confidence going forward.”