With their full starting lineup available for the first time in three weeks, the Warriors defeated the New York Knicks, 114-106, Tuesday night in front of a socially-distanced crowd at Madison Square Garden.

Stephen Curry had 37 points — including 26 in the second half — in his return after a one-game absence. Centers James Wiseman and Kevon Looney, both available for the first time in 10 games, helped stabilize the Warriors’ defense and provide much-needed size.

In his first game back from a sprained ankle he suffered on Feb. 2, Looney showed why the Warriors (17-15) view him as a foundational part of the roster. He helped set the tone with strong screens, timely passes and reliable defense.

“Loon just ties things together,” head coach Steve Kerr said. “You put him in and he makes the right play over and over again.”

Along with Curry, Looney (two points, six rebounds and four assists) helped the Warriors take a 13-point lead with 6:12 left in the third quarter. It appeared Golden State had taken control of the game, but an offensive drought allowed the Knicks to tie the game with four minutes left in the fourth quarter.

Having squandered second-half leads in each of the last two games, Golden State risked dropping three in a row for the first time this season. But the Warriors starters outscored the Knicks 17-12 down the stretch to complete the win. Curry’s wrap-around pass that led to a Kelly Oubre Jr. dunk, plus his five made free throws in the final 30 seconds, put a bow on the win.

The Knicks (15-17) were paced by newly-minted All-Star Julius Randle (25 points, 10 rebounds and seven assists) and point guard Elfrid Payton, who finished with 20 points and four assists.

Golden State’s defense held New York to 39.6% shooting and scored 13 points off 15 Knicks turnovers. On offense, the Warriors shot 44.9% overall and assisted on 30 of their 40 made field goals.

Wiseman, playing for the first time since spraining his left wrist in a Jan. 30 loss to the Pistons, had 14 points on 6-of-9 shooting. Draymond Green finished with seven points, 12 assists and nine rebounds. Oubre added 19 points and Andrew Wiggins tacked on 16.

This was an important win for a Warrior team that had struggled in recent crunch time situations. In Saturday night’s loss in Charlotte, Draymond Green’s ejection allowed the Hornets to score four points in the final 9.3 seconds and steal the win. A night before that, the Warriors led the Magic by 13 midway through the fourth quarter but couldn’t hold on.

But of the eight games the Warriors have played this month that have been within five points in the final five minutes, this was the first in which Kerr had all of his starters and most effective lineups available. The Warriors had been 2-5 prior in such situations prior to Tuesday.

When the offense stalled in the fourth quarter, Kerr went to a small-ball lineup featuring Green at center and Eric Paschall at power forward. Paschall’s dunk with 6:36 remaining was their first field goal of the period, and Kerr rode a small lineup until the buzzer.

Going forward with a team nearly fully healthy — minus Klay Thompson (right Achilles tear) and Marquese Chriss (broken right leg) — Kerr will be able to mix and match lineups more and take advantage of matchups at the end of games.

“I think we’re in a good place,” Looney said. “It’s been a lot of ups and downs in the season … but I think we’re realizing that there’s a lot of different things we can do.”

Now 1-2 on this East Coast swing, the Warriors are in position to salvage this trip when they play the Indiana Pacers Wednesday night.

“It would have been really rough to let this one slip away,” Kerr said. “We would not have won this game without Loon and James. We have more options now. … There’s no reason why we can’t break through.”