The Hawks benefited from a phantom foul call and a bizarre do-over during the fourth quarter of their 99-96 victory over the Knicks Sunday at Madison Square Garden.

“I’ve never seen that happen,” Hawks guard Kent Bazemore said.

With 3:49 to play, and the Hawks trailing 89-86, Knicks guard Tim Hardaway Jr. was called for fouling Bazemore on a 3-point attempt. Replays showed that Hardaway made no contact with Bazemore, who shot from well behind the 3-point line.

Bazemore went to the free-throw line for what should have been three attempts. He only took two, missing both, before the Knicks rebounded and play continued.

“That’s how far out of space I was, I didn’t even think to say anything,” Bazemore said. “I knew it was a 3(-point try).”

On the next Knicks possession, Hardaway scored on a drive and was fouled by Bazemore. But as players lined up for the free-throw attempt, Hawks coach Mike Budenholzer got the attention of game officials, who huddled before going to a video review of Bazemore’s 3-point attempt.

Eventually officials determined that Bazemore should have been awarded three free throws. They nullified Hardaway’s score and Bazemore made the belated free-throw attempt to pull the Hawks within 89-87.

Game official Pat Fraher told a pool reporter that if a merited free throw is not shot it is considered a “correctable error.” Fraher said that, under the rule, if less than 24 seconds elapse after the error then all play up until that point is nullified, the game clock is reset and game play returns to the point of interruption.

Budenholzer said he was expecting Bazemore to take three free throws but figured he may have missed something.

“I can’t remember anything like that,” Budenholzer said. “We caught a break there, no doubt about it. I think (it was reversed) because it was so close to when it actually happened. Sometimes things like that go on and maybe you go back and watch film and see (a call) that should have been different. But I’ve never seen anything like that.”