BOSTON -- Ron Mercer sank a 15-foot jumper with 14.8 seconds left in overtime as the Boston Celtics avoided elimination from the playoff race and severely damaged Orlando's bid for a postseason spot with a 82-80 victory Friday night.
The Celtics must win their remaining five games and eighth-place New Jersey must lose its last six games for Boston to make the playoffs.
The Magic fell two games behind idle New Jersey in the Eastern Conference. Orlando has four games left.
Boston's victory also clinched a playoff berth for the Cleveland Cavaliers, who are currently sixth in the East.
After Mercer's foul-line jumper put Boston up 81-80, the Magic had a chance to win. But Nick Anderson, who finished with 21 points, missed a jumper with three seconds left and Boston's Greg Minor grabbed the rebound with 1.3 seconds remaining.
Tyus Edney hit one of two free throws for the Celtics with seven-tenths of a second left, and Orlando got the rebound with three-tenths of a second remaining. But Anderson's desperation shot didn't come close as time expired.
Dana Barros led Boston with 26 points, including five 3-pointers in the second half. Mercer finished with 14 points but Antoine Walker, coming off a 43-point effort against New Jersey on Wednesday, was held to 10.
Horace Grant, who sent the game to overtime by scoring on a putback of Anderson's airball with 6.2 seconds left in regulation, scored 16 points for the Magic.
Boston's Travis Knight missed a jumper from the top of the key with less than a second left in regulation, and Orlando's subsequent inbounds pass was tipped away, sending the game to overtime.
The Celtics took a 70-61 with 5:56 to left in regulation on Barros' fourth 3-pointer of the second half before Orlando rallied.
The Magic used an 11-4 run to slice Boston's lead to 74-72 when Anderson was awarded a basket on Andrew DeClercq's goaltending with two minutes left. Orlando committed a shot-clock violation with 40 seconds to go, but Barros turned the ball over in traffic with 18 seconds left.
Grant's basket gave Orlando its first lead of the game, 45-44, with 6:15 left in the third quarter before Barros scored seven points during Boston's 13-6 run that closed the quarter.
The Celtics opened a 26-11 lead on Barros's 3-pointer with 7:42 left in the second quarter before the Magic used a 20-6 spurt to close the margin to 34-32 at the break.