The win ended New York's seven-game losing streak.
NEW YORK (AP) -- Penny Hardaway watched from afar as the New York Knicks stumbled through a disastrous January.
Finally back with the team Friday after rehabbing his hamstring in his hometown of Memphis, Hardaway played a big part in helping his team end its seven-game slide.
Hardaway showed no rust in his first game in more than three weeks, making a key jumper with 36 seconds remaining to lead the Knicks to a 99-96 victory Friday night over the short-handed Cleveland Cavaliers.
After being activated from the injured list prior to the game, Hardaway finished with 12 points and was on the court for the entire fourth quarter as the Knicks held off the Cavs, who were without LeBron James (sprained ankle) for the first time this season.
"We missed him a lot. A player like that, you can't replace him," Cavs center Zydrunas Ilgauskas said.
Six days after taking over for Lenny Wilkens, Herb Williams gained his first victory as coach of the Knicks.
Road trip ahead
The win couldn't have come at a better time for New York, which played the final date of a four-game homestand before leaving on a six-game road trip. Another loss would have put the Knicks in jeopardy of approaching the team-record losing streak of 12 games set in 1984-85.
"I talked to my teammates to see what was going on internally, see how everyone was feeling and tried to get them off the losing streak that we were on," said Hardaway, who received permission from team president Isiah Thomas to take an extended absence. "Hopefully this will turn us around in a positive direction."
Stephon Marbury and Jamal Crawford scored 22 points each, and Nazr Mohammed had 21 points and 10 rebounds for the Knicks.
James, who sprained his ankle Wednesday against Memphis, watched from the bench wearing blue jeans and an untucked dress short.
Drew Gooden added 21 points and 14 rebounds, and Sasha Pavlovic had 17 points in his first career start for Cleveland. Eric Snow replaced James in the starting lineup and had three points, three assists and two rebounds in 40 minutes.
Without their main weapon, the Cavs were forced to go to Ilgauskas for their biggest shot of the game -- a 20-foot jumper that missed with two seconds remaining.
Hardaway grabbed the rebound, and Jamison Brewer made two free throws for the final margin as New York won for the first time since Jan. 9.
Ilgauskas scored 24 points to lead the Cavaliers, though he sat for a long stretch of the fourth quarter after picking up his fifth foul and didn't return until 1:28 remained. The Cavs trailed 95-90 at the time, but they scored the game's next four points from the foul line to make it 95-94 with 44 seconds remaining.
Hardaway's jumper made it a three-point game with 36 seconds to go, and Ilgauskas made two foul shots five seconds later.
Mohammed missed a jumper from the lane with 16 seconds remaining to give Cleveland a chance to shoot for the win, but Ilgauskas was a little out of his range when he lofted his jumper from beyond the top of the key after getting free on a pick-and-roll play and receiving a pass from Jeff McInnis.
"I got a great look. I would take that shot every time," Ilgauskas said. "Usually game-winners are a lot tougher shots, but it just didn't go down."
Copyright 2005 Associated Press. All rights reserved. This material may not be published, broadcast, rewritten, or redistributed.