LeBron James scored 24 on a bad left ankle for the Heat, who closed within a game of the Eastern Conference-leading Pacers. Chris Bosh added 15 points for Miami, including a 3-pointer that tied it late in the fourth.
James set up Allen for the 3 that put Miami in front for good with 59.5 seconds left, capping a 10-0 run.
Paul George scored 25 points but missed a 3-pointer that would have tied it with 4 seconds left. David West had 23 and Lance Stephenson added 13 for the Pacers, who have dropped two straight.
Down by one, the Pacers saw their best chance go awry when George Hill turned the ball over on a bad pass with 14 seconds left. Allen made two free throws with 10.3 seconds remaining to put Miami up by three, and that capped a big comeback win for the two-time defending NBA champions.
HAWKS 124, KINGS 107
In Atlanta, Ga., Kyle Korver made seven consecutive 3-point attempts on his way to a season-high 28 points, leading the Atlanta Hawks to victory over the Sacramento Kings.
Al Horford added 25 points and 10 rebounds for the Hawks, who have won two in a row and five of seven games. Jeff Teague finished with 18 points and tied a career high with 15 assists.
DeMarcus Cousins scored 28 points, Rudy Gay had 22 and Isaiah Thomas 20 for the Kings.
The Hawks outscored the Kings 39-20 in the fourth quarter.
Horford made consecutive jumpers to help Atlanta open a 117-105 lead with 2:49 left.
Korver missed his first 3 attempt early in the first, but then hit seven in a row before missing midway through the fourth. He went 8 for 10 from long range while extending his NBA record to 95 consecutive games with at least one 3-pointer.
There were 14 lead changes in the third quarter. Late in the period, Gay stole the ball from Teague and drove the length of the court for a reverse layup that put the Kings up 78-75, but Teague answered with a 3 on Atlanta’s next possession.
Sacramento grabbed the lead for the first time early in the second quarter. Jimmer Fredette had a jumper and a 3-pointer, and Cousins’ tip-in made it 33-30 with 9:38 to go.
The Hawks had a quick response. Korver made his third 3 and Mike Scott’s alley-oop dunk put Atlanta ahead by six about 3 minutes later.
Gay, who was playing with right knee stiffness from Tuesday’s loss at Charlotte, hit a jumper in the final minute of the second to put Sacramento up by one.
Scott hit consecutive 3s from the left corner early in the fourth, his second one making it 93-91 and giving Atlanta the lead for good
After resting to begin the fourth, Cousins returned with 7:44 remaining, but he was nearly shut down offensively, hitting his only field-goal attempt after being very active in the paint throughout the first three quarters.