Knicks guard Immanuel Quickley, left, defends as Celtics guard Marcus Smart during their game Sunday in Boston. Quickley scored a career-high 38 points and the Knicks won in double-overtime, 131-129. Steve Senne/Associated Press

BOSTON — Immanuel Quickley scored a career-high 38 points, playing 55 minutes in place of injured starter Jalen Brunson, and the New York Knicks outlasted the Boston Celtics 131-129 in two overtimes Sunday night for their season-high ninth straight victory.

Quickley had seven points in the second overtime and added eight rebounds and seven assists with Brunson sidelined because of soreness in his left foot.

Julius Randle had 31 points and nine rebounds, and RJ Barrett finished with 29 points and 11 boards for the Knicks, who held on when Boston’s Al Horford front-rimmed a 3-pointer from the right corner just before the final buzzer.

Jayson Tatum led Boston with 40 points, 11 rebounds and six assists, Jaylen Brown scored 29 points and Horford finished with 20 points and 14 rebounds.

Randle had 43 points in a victory at Miami on Friday that included an off-balance, game-winning 3-pointer in the closing seconds.

The Celtics were also missing a couple of key players in starting center Robert Williams III (left hamstring tightness) and reserve guard Malcolm Brogdon (right ankle soreness).

Advertisement

Quickley scored New York’s first seven points of the second overtime on a 3-pointer and two driving baskets, skipping in front of Boston’s bench celebrating after the last basket made it 128-123.

Horford nailed a 3-pointer from the right corner with 29.2 seconds left to push Boston ahead 121-119 in the first OT after Randle’s two free throws had moved the Knicks in front.

But Quickley’s driving one-handed flip in the lane tied it before Tatum missed on his baseline drive, sending it to double OT.

Brown’s 3-point play with 12.9 seconds left sent it to overtime.

Coming off an embarrassing home loss in their last game when they blew a 28-point lead against Brooklyn, the Celtics had opened a 14-point edge midway into the third quarter. The Knicks closed the quarter with a 9-0 surge and pushed their advantage to 100-89 on Obi Toppin’s driving layup early in the final quarter.

BAD EXAMPLE

Advertisement

Randle was whistled for a technical by referee Brett Nansel when he was showing what happened after being called for an offensive foul. The problem was he used his left shoulder to bump into Nansel’s chest as he was explaining it.

TIP-INS

Knicks: Quickley hit a 3 for the game’s first basket, raising his fingers in celebration. … Brunson was the Eastern Conference’s player of the month for February, averaging 27.3 points, six assists and shooting 52.9%.

Celtics: Coach Joe Mazzulla said Williams could be out “seven to 10 days.” … Tatum was ejected with two technical fouls in the teams’ last meeting, a 109-94 loss in New York.