It's not every day in the NBA that a team comes from 25 points down to win with a buzzer-beater, capping a game where a player lands 10 or more three-pointers.

In fact, it happened for the first time in league history on Thursday as the New York Knicks stormed back to beat the Boston Celtics 108-105 at Madison Square Garden.

From 57-32 adrift in the second quarter, the Knicks were inspired by Evan Fournier's remarkable shooting from behind the line against his former team, and RJ Barrett came up with the last-gasp glory shot.

Each of the three standout facets of the Knicks' win had been achieved in isolation, but they had never all come in the same game, Stats Perform said.

The Knicks were able to celebrate their biggest comeback win since coming from 26 behind against Milwaukee in March 2004, while Fournier's 10 threes matched a franchise record set by JR Smith.

Barrett's buzzer-beater was the Knicks' first for over nine years, with Smith the last player to grab a win at the death with his shot against Phoenix on December 26 in 2012.

Fournier finished with 41 points, a career-best haul, and he has shone brightest in games against Boston this season, after his short-lived spell with the Celtics last season.

Only three times has Fournier topped 30 points for the Knicks, and each time Boston have been the opponents. He had 32-point games against them in October and December, and stepped it up in the latest meeting.

Fournier said, quoted in the New York Post: "Maybe there is a little bit of extra motivation, but it is not something that I do on purpose against the Celtics. But yes, three times in a row, so it is hard to say no, it is not a coincidence."

Jayson Tatum responded with 36 points for Boston, together with six rebounds and nine assists, before Barrett's pull-up jump shot for a three-pointer soared over him at the end of the game to win the day.

Barrett said: "Man, that was crazy – I didn't even really see it because I fell. I didn't see it go in but from everyone else's reaction, I knew it did."

Fournier's own feats were made all the more remarkable by the fact he failed to register a point in almost 22 minutes on court during the Knicks' previous game, a win over the Indiana Pacers two days earlier.

The Frenchman is still averaging a patchy 13.5 points per game this season, and has had scathing reviews, but for one night that disappointing start to his Knicks career did not seem to matter.