NEW YORK — D'Angelo Russell scored 29 points, including six in overtime, and the Brooklyn Nets snapped an eight-game losing streak by beating the Toronto Raptors 106-105 on Friday night.

Brooklyn picked the most unlikely way to end its skid, snapping a 12-game slide against Toronto with its first victory over the Raptors since April 3, 2015.

Jarrett Allen made the go-ahead basket for the Nets with a little more than a minute left, their only basket in overtime not made by Russell.

Kawhi Leonard scored 32 points for the Raptors, but Toronto couldn't get a look for him on its final possession and had to settle for Fred VanVleet's 3-pointer that just missed.

Spencer Dinwiddie scored 17 points for Brooklyn.

Jonas Valanciunas added 24 points for the Raptors.

The Nets led by seven with under five minutes remaining in regulation, but Leonard fed VanVleet for a 3-pointer and then scored the next six points himself to give Toronto a 96-94 edge with 2:23 to play. But his shot from in the lane rattled out with 7 seconds to play, and he blocked Dinwiddie's shot on the other end to force OT.

Russell had the first two baskets in the extra session, Leonard made the next two, and the Nets eventually pulled out a close game after they had fallen three times by two points during their losing streak.

HORNETS 113, NUGGETS 107 — Kemba Walker had 21 points, eight assists and six rebounds, fellow point guard Tony Parker added 19 points off the bench and host Charlotte snapped Denver's seven-game win streak. Marvin Williams chipped in with 14 points and 10 rebounds for the Hornets, who ended a three-game losing streak. Denver came in the with the best record in the Western Conference, but shot 39 percent from the field and 23 percent from 3-point range. The Hornets put the clamps on Nikola Jokic for most of the game, holding the 7-foot, 250-pound center to 16 points and 11 rebounds. Jamal Murray led the Nuggets with 20 points.

PACERS 112, MAGIC 90 — Bojan Bogdanovic scored 26 points and Cory Joseph added 15 to help Indiana beat host Orlando. Thaddeus Young had 14 points and eight rebounds, and Tyreke Evans scored 11 points for Indiana. The Pacers have beaten the Magic eight straight times and 15 of the last 16 meetings. Nikola Vucevic led Orlando with 22 points and 10 rebounds, and Aaron Gordon had 20 points and 14 rebounds. Terrence Ross was the only other Magic player to reach double figures with 11. The Magic survived a scare in the first quarter when Vucevic stayed on the floor clutching his ankle after coming down on Turner's foot. The Magic center limped over to the bench and took a seat, but was back in for the final 7:21 of the second period.

76ERS 117, PISTONS 111 — Jimmy Butler scored 38 points and host Philadelphia overcame Joel Embiid's absence, rallying from a 15-point third-quarter deficit to beat Detroit. Blake Griffin had 31 points and 12 rebounds for Detroit, but the Pistons squandered their big third-quarter lead, as well as a six-point advantage in the fourth. The 76ers rested Embiid, who missed his first game of the season, but Detroit couldn't take advantage of the big man's absence. Butler had 26 points in the second half.