Emmanuel Mudiay had 34 points and 8 assists as the short-handed Knicks erased a 21-point deficit and beat the Charlotte Hornets, 126-124, in overtime Friday night.

Mudiay scored 14 points in the fourth quarter, including a fadeaway jumper with 27.2 seconds left that tied the game at 113-113. Charlotte’s Kemba Walker missed a 3-pointer with 8.2 seconds left, and the game went to overtime.

Tim Hardaway Jr. and Luke Kornet each hit deep 3-pointers to open overtime, and Mudiay had three jumpers that widened the gap. Charlotte missed eight of 12 shots down the stretch.

Walker finished with 16 points and 10 assists. The Hornets were hoping to win their fourth straight game.