Spike Lee, left, greets Dustin Hoffman as they attend an NBA basketball game between the New York Knicks and the San Antonio Spurs at Madison Square Garden in New York, Sunday, Feb. 12, 2017. (AP Photo/Craig Ruttle)
Spike Lee, left, greets Dustin Hoffman as they attend an NBA basketball game between the New York Knicks and the San Antonio Spurs at Madison Square Garden in New York, Sunday, Feb. 12, 2017. (AP Photo/Craig Ruttle) Credit: ap — Craig Ruttle

New York — Carmelo Anthony scored 25 points and the New York Knicks salvaged the finale of a tumultuous five-game homestand by beating the San Antonio Spurs, 94-90, on Sunday.

With Latrell Sprewell and a number of other former Knicks in attendance two days after Charles Oakley was banned, the current team pulled out a defensive performance from its past, limiting the Spurs to 36 percent shooting.

That came just two nights after the Knicks yielded 131 points in a dismal defensive performance against Denver, which came after losses to Cleveland and both Los Angeles teams to start the homestand.

Kawhi Leonard had 36 points for the Spurs (41-13), who had their two-game win streak snapped and failed in their first attempt to secure what would have been an NBA-record 20th consecutive winning season.

The Knicks didn’t let the Spurs reach 70 points until fewer than 8 minutes remained. Then Anthony provided offense when they needed it clinging to a two-point lead, making consecutive baskets to make it 92-86 with 33 seconds remaining.

Pistons 102, Raptors 101

Toronto — Tobias Harris had 24 points off the bench, Kentavious Caldwell-Pope added 21, including a go-ahead 3-pointer with 13.2 seconds left, and Detroit overcame a 16-point fourth-quarter deficit to beat Toronto.

Andre Drummond had 10 points and 18 rebounds for his 36th double-double of the season.

Timberwolves 117, Bulls 89

Minneapolis — Andrew Wiggins scored 27 points and Karl-Anthony Towns added 22 to help Minnesota beat severely shorthanded Chicago.

Ricky Rubio had 17 points, 11 assists and six rebounds and Minnesota shot 54 percent to help coach Tom Thibodeau sweep the season series against his former team. Gorgui Dieng added 10 points and 13 rebounds.

Doug McDermott scored 16 points and made four 3-pointers for the Bulls. They were missing Jimmy Butler, Dwyane Wade, Nikola Mirotic and Paul Zipser with injuries. The Bulls turned the ball over 18 times, were outrebounded 46-35 and were outscored 56-38 in the paint.