NEW YORK -- The Knicks beat the San Antonio Spurs at home Sunday night to avoid the wrong kind of NBA history.

The Knicks' 130-118 victory snapped an 18-game home losing streak. Had New York lost Sunday, the club would have tied the 1993-94 Dallas Mavericks for the longest home losing streak in NBA history.

The Knicks' victory was a topic of conversation during Sunday's Academy Awards in Los Angeles.

Actor Samuel L. Jackson, on stage to announce the best adapted screenplay, told longtime Knicks fan and friend Spike Lee that New York had ended its home skid.

"First of all Spike, so glad you're sitting down. After 18 consecutive home losses, the Knicks won tonight. I repeat. The Knicks won tonight, defeating San Antonio 130 to 118," Jackson said.

Lee appeared to shout back at Jackson, "We're trying to tank."

The Knicks (12-48) have the second-worst record in the NBA. But whenever he has been asked about it, head coach David Fizdale has pushed back against the theory that the team is tanking.

Fizdale said Sunday night that the home losing streak wasn't a topic of discussion among his players.

"That's why I really like this group of guys: They get over [a loss] fast, and they get back to work," Fizdale said. "At some point, you know, the basketball gods will look out for you when you're doing that. And they just stayed with it and chipped away. We beat a good team tonight."

Damyean Dotson led the Knicks against San Antonio with 27 points, hitting a career-high eight 3-pointers. Dennis Smith Jr. had 19 points and 13 assists, and Mitchell Robinson added 15 points, 14 rebounds and 5 blocks off the bench.

Spurs coach Gregg Popovich credited his reserves for keeping San Antonio in the game at Madison Square Garden but wasn't happy with his club's defense.

"It was a pathetic performance defensively. But the Knicks had something to do with it," Popovich said. "They were physical, they did a good job."

New York last won at home Dec. 1. Earlier in the season, the Knicks lost a franchise-record 18 consecutive games.

The Knicks project to land a top draft pick in June, something they hope to use to further their rebuild.

Per the new lottery odds this season, the three teams with the worst records will share a 14 percent chance of getting the No. 1 overall pick. The Knicks enter play Monday two games behind Cleveland (14-46), which has the third-worst record in the NBA. The Phoenix Suns (11-50) have the league's worst mark.

In addition to having a top draft pick, New York also projects to have $70 million in cap space this summer -- enough to sign two max free agents.