TORONTO -- The Knicks made sure they wouldn't be eliminated from playoff contention Friday night. But their stay of execution might last only one day.

Big games by Carmelo Anthony and Amar'e Stoudemire and a strong defensive effort in the fourth quarter helped the Knicks earn a 108-100 win over the Raptors.

Had the Knicks lost, their playoff chase would have ended because the Hawks beat the Nets in Brooklyn on Friday night.

The Knicks (34-45) remained two games behind Atlanta (36-43) for the Eastern Conference's last playoff spot with three games to play. Because the Hawks hold the tiebreaker, their magic number was reduced to one -- one Hawks win or Knicks loss and the Knicks are done.

Atlanta has a pair of home games against the Heat tonight and the Bobcats before visiting the Bucks. The Knicks host the Bulls Sunday, face the Nets in Brooklyn and then play the Raptors at the Garden.

"I don't think it's impossible," J.R. Smith said. "It's a long shot, but as long as we still got a shot, we got a chance to get in."

"We got to hope that Atlanta loses the next three and we win three," Mike Woodson said. "That's the only way we have a shot at getting in."

The Nets didn't do the Knicks any favors. With the fifth seed essentially locked up, they sat Deron Williams, Shaun Livingston and Alan Anderson against the Hawks.

Woodson did not emerge to talk with reporters until after the Hawks' victory.

"I can't feel deflated," he said. "Had we lost, it would really be tough then. But we won, they won. We got to see what we're made of on Sunday and see if we can keep the winning going."

But it won't matter if Atlanta beats Miami Saturday night.

Anthony has been playing with a strained right shoulder and winced at times Friday night. But he had 30 points, shooting 8-for-17 from the field and 13-for-14 from the line. Stoudemire had 24 points and 11 rebounds.

DeMar DeRozan had 26 points and Kyle Lowry added 25 for the Raptors (46-33), who shot 15-for-33 from three-point range. But they were held to 5-for-21 shooting in the fourth quarter.

The Knicks fell behind by eight in the third quarter before going ahead by five late in the quarter. In the fourth, Iman Shumpert sparked the Knicks' defense, and they took a 100-89 lead with 4:03 remaining on Stoudemire's second straight driving dunk.

Toronto cut it to 100-93 with 2:03 left and had several opportunities to draw closer, but the Raptors missed four shots on one trip. They got within 100-95 with 36.8 seconds left, but Smith and Raymond Felton each hit four free throws in the last 29.6 seconds.

The Knicks hadn't played since Sunday afternoon in Miami, and the time off helped Anthony's shoulder, which he injured last week against the Nets. X-rays were negative.

Anthony said he still doesn't know what's wrong with it but hasn't gotten any additional tests. He said he will keep playing as long as the Knicks are playing for something.

"At this point, what is the tests going to do?" he said. "If they say something is really bad with it, I'm still not going to sit out. I'd rather wait until it's all over with. Until the numbers say we're eliminated, I'm not going to sit out."

Notes & quotes: A league source confirmed an ESPN report that the Knicks are considering signing former Laker Lamar Odom for the last few games. "There is interest on both sides," the source said. Odom helped the Lakers win two titles under Phil Jackson. The Queens native hasn't played in the NBA this season.