New York Knicks' Carmelo Anthony, left, reacts as Charlotte Hornets...

New York Knicks' Carmelo Anthony, left, reacts as Charlotte Hornets players congratulate Kemba Walker, bottom right, after Walker's game-winning shot in an NBA game in Charlotte, N.C., Friday, Dec. 5, 2014. Credit: AP / Chuck Burton

Down by 21 points in the third quarter to a Hornets team in the midst of a 10-game losing streak, the Knicks faced another demoralizing defeat Friday night.

But they came all the way back, taking the lead on Carmelo Anthony's three-pointer with 40.7 seconds left. It was shaping up as one of their best wins of the season, not that there have been many.

But Kemba Walker drove for a layup at the buzzer to give the Hornets a 103-102 victory and extend the Knicks' losing streak to seven in a row.

Walker beat Pablo Prigioni and Amar'e Stoudemire with a lefty layup on a play that began with four seconds left and the Knicks having a foul to give. Asked if there was a better way to defend it, coach Derek Fisher said: "Yes."

Asked how, he said: "Just probably could have kept the ball in front of us a little better. We had a foul to give."

J.R. Smith, who along with Stoudemire seemed most despondent after the defeat, said: "We've got to be able to take information from the huddles and perform it on the court. We're just not doing it right now and it's costing us."

Prigioni said he tried to grab Walker's jersey, but Walker went by too fast. Stoudemire sat stone-faced in front of his locker for 10 minutes before departing without taking questions.

"[Walker] is so small," Tim Hardaway Jr. said of the 6-1 guard. "He just got around everybody, I guess."

After the winning basket, Walker got congratulations from Hornets owner Michael Jordan, who still loves to torment the Knicks. Jordan briefly interrupted Fisher's postgame news conference to reach in and shake his hand without either saying a word.

Jordan was smiling. Fisher was not.

Anthony led the Knicks (4-17) with 32 points. Smith had 14 and Hardaway 13, including 11 in the fourth quarter. The Knicks, who trailed by 18 points with 10 minutes remaining, hit six three-pointers in the fourth.

Gerald Henderson had 22 points for Charlotte (5-15). Al Jefferson and Lance Stephenson had 16 each and Walker -- who shot 4-for-15 -- added 11.

Fisher made a change in the starting lineup from Thursday night's 90-87 loss to the Cavaliers. Samuel Dalembert returned to the lineup, replacing Quincy Acy, who had a career-high 15 points against the Cavs.

Fisher used all 13 available players in the first half. If Charlotte assistant coach Patrick Ewing hadn't been in a suit on the bench, Fisher might have tried to put him in, too.

The Knicks trailed 31-21 after one quarter despite Anthony's nine points. That equaled his output from Thursday, when he shot 4-for-19 and missed a potential tying three-pointer in the final seconds.

The Knicks got as close as five points in the second quarter, but the Hornets played more like last season's playoff squad than this year's version and led 57-45 at the half, 82-61 with 21/2 minutes remaining in the third quarter and 89-71 two minutes into the fourth quarter.

The last time these teams met, on Nov. 2, the Knicks improved to 2-1 with a 96-93 victory at the Garden. Anthony scored 28, including a key basket late in the fourth, and optimism was in the air.

"I think we felt good about who we were at that time," Fisher said. "Coming off of a good road win in Cleveland and even watching the game back [on video], guys were excited to be out on the floor."

SUBSCRIBE

Unlimited Digital AccessOnly 25¢for 6 months

ACT NOWSALE ENDS SOON | CANCEL ANYTIME