NEW YORK (AP)Asked before the game about his team’s victory over the Knicks last week, Spurs coach Gregg Popovich was quick to note that Jalen Brunson didn’t play.

What a difference he made in the rematch.

Brunson scored a career-high 38 points, Julius Randle had 25 points and 13 rebounds, and New York beat San Antonio 117-114 on Wednesday night.

Brunson added seven rebounds and six assists for the Knicks, who won their third straight since a 122-115 loss in San Antonio last Thursday.

”He’s got it all,” Popovich said. ”He’s got the skill, but he’s got the toughness. He’s got the basketball IQ to go with it. Just a hell of a competitor.”

Brunson missed three games last week with a sore right hip, but returned with 24 points in a victory over Phoenix on Monday. He made the big plays late in this one to surpass his previous regular-season best of 34 points.

”Whatever it takes to win,” Brunson said. ”I could have 38 or I could have three points. If we win that’s all I really care about.”

Brunson made the go-ahead basket with 3:02 to play, then knocked down a pair of jumpers to push the lead to 116-112 with 1:17 to go.

The Spurs cut it to two and forced the ball out of Brunson’s hands to regain possession with a chance to tie, but they were called for a 5-second violation trying to get the ball in with 5.7 seconds remaining. Evan Fournier made one free throw to make it 117-114, but the Spurs couldn’t get off a last 3-point attempt in time.

”The bottom line is getting the win,” Knicks coach Tom Thibodeau said. ”We’ve just got to scratch wins out.”

Keldon Johnson scored 26 points for the Spurs, and Josh Richardson had 20. Zach Collins added 16 points and Doug McDermott finished with 15, but the Spurs gave up 25 second-chance points.

The Knicks led by 13 in the first quarter before settling for a 39-29 advantage. The Spurs charged ahead with a 13-0 run in the second to go ahead 44-41, but the Knicks recovered and were up 62-55 after Brunson had two baskets in the final 35 seconds of the first half.

Both teams shot better than 60% in the third quarter, with Randle’s jumper as time expired making it 94-89.

TIP-INS

Spurs: G Devin Vassell was out again because of left knee soreness. He played Monday after missing the previous two games for the same problem. … The Spurs practiced at Baruch College while in the city and Popovich joked he looked for a picture of U.S. Rep.-elect George Santos in the gym. Santos has admitted to lying about having earned a degree in finance and economics at the school. ”I thought maybe he had played sports or something while he was there,” Popovich said. ”Because that’s where he went to school, right?”

Knicks: Obi Toppin and Derrick Rose were active but did not play. Toppin had been inactive the previous 13 games because of a nondisplaced fracture of his right fibula. Thibodeau said he needed to do more at practice before he was ready to get into a game. Thibodeau said the backup forward would play when ready, but stopped short of assuring a return to his previous minutes, with Randle flourishing with a heavier workload.

PACKING THE PLACE

The Spurs said more than 53,000 tickets have been sold for their Jan. 13 game at the Alamodome against Golden State, guaranteeing it to be the third-largest attendance for an NBA game. The record is 62,046 at the Georgia Dome for a Bulls-Hawks game on March 27, 1998.

UP NEXT

Spurs; Host Detroit on Friday.

Knicks: At Toronto on Friday.

AP NBA: https://apnews.com/hub/NBA and https://twitter.com/AP-Sports