MIAMI (AP) — Ray Allen's 3-pointer with 32 seconds left highlighted a huge Miami rally, and the Heat advanced to the Eastern Conference finals by topping the Brooklyn Nets 96-94 on Wednesday night.

The Heat won the series 4-1, and will face either Indiana or Washington in the East finals starting next week.

Miami had not led since late in the second quarter before Allen's shot from the left wing put the Heat up 93-91. Shaun Livingston tried to answer with 24 seconds left, missing in the lane and Chris Bosh controlled the rebound for Miami.

Allen made a pair of free throws with 21.6 seconds to play, capping a 12-0 run that erased an eight-point deficit.

LeBron James scored 29 points and Dwyane Wade had 28 for the Heat. Joe Johnson scored 34 for the Nets, including a 3-pointer with 11 seconds left that got his team within one.

More From 104.5 THE TEAM