MIAMI _ It was the kind of night where the Miami Heat got a delay-of-game warning for not being ready for the start of the second half.
Where they committed a 24-second violation coming out of a third-quarter timeout.
Where wide open layups were a 50-50 proposition and free throws about the same for much of the night, including a Justise Winslow airball from the free-throw line in the fourth quarter.
If this was going to be the night the Heat bounced back from blowing a 12-point fourth-quarter lead to the Sacramento Kings at the start of this two-game homestand, it nearly turned into something far more humbling Saturday night at AmericanAirlines Arena.
Ultimately, they found a way.
Playing to the buzzer for the second consecutive Saturday against the Charlotte Hornets, the Heat got a 3-pointer from Wayne Ellington with 4.6 seconds to play to help them escape with a 95-91 victory.
Unable to get a handle on Kemba Walker, who closed with 30 points, and Dwight Howard, who closed with 20 points and 16 rebounds, the Heat nonetheless again had the Hornets' number, closing out the season series at 4-0.
Forward Josh Richardson led the Heat with 19 points, seizing control of the offense late, supported by 17 from Ellington, who set a personal career high for 3-pointers made in a season earlier in the game, and 16 from Kelly Olynyk.
Those efforts were needed with both Hassan Whiteside and Goran Dragic watching the finish from the Heat bench on their uneven nights.
Whiteside played only 18 minutes, 25 seconds. Dragic closed 2 of 8 from the field.
The Heat got closer to their regular starting lineup, with Tyler Johnson back after missing the previous five games with a sprained ankle. Johnson was initially injured during the Jan. 15 road loss to the Chicago Bulls.
Coach Erik Spoelstra held off until shortly before tipoff on the decision to move Johnson directly back into the starting lineup, where he was joined by Whiteside, James Johnson, Richardson and Dragic.
Spoelstra said before Thursday night's loss to the visiting Sacramento Kings that he wanted to get two additional days of work for his shooting guard.
The Heat did not hold a formal practice session Friday, but did conditioning work and video review, with the team then holding a game-day shootaround Saturday morning.
"It means a lot, having Tyler back out there," Ellington said.
Johnson then took a misstep with 2:26 left in the second period, hobbling on the left ankle before he was removed. He returned less than a minute later.
Johnson had been starting in place of Dion Waiters, who underwent season-ending ankle surgery last week. When those two were out, Spoelstra had been starting Derrick Jones Jr.
Jones remained with the team Saturday, now down to seven remaining days he can spend in the NBA this season on his two-way contract. Once that limit is reached, he either must be returned to the G League for the balance of the season, be waived or be offered a standard NBA contract, which would require opening a spot on the team's 15-player NBA roster.
Derrick Walton Jr., the Heat's other two-way contract, was not with the team Saturday. He has five remaining days on his deal.
The Heat had veteran forward Udonis Haslem back after he missed Thursday's loss to be with agent Henry Thomas before Thomas' death Saturday in Chicago.
In addition, the Heat remained without wing Rodney McGruder, who underwent preseason leg surgery, and forward Okaro White, who underwent early-season foot surgery.
The Hornets were without backup point guard Michael Carter-Williams due to a shoulder strain.
An Olynyk 3-pointer midway through the fourth quarter drew the Heat within one. It went back and forth from there as a one-point game before Marvin Williams scored on a drive for a 90-87 Hornets lead.
After ensuing misses on both ends, Richardson swooped in for a layup to draw the Heat within 90-89.
Empty possessions followed for both teams, leaving the Heat down one with 1:35 to play.
That's when Richardson attacked the rim for a driving layup that turned into a 3-point play with 1:21 left and a 92-90 Heat lead.
Richardson then came up with a steal on the other end with 63 seconds left, only to see Ellington miss a 3-pointer.
That put Charlotte back in possession down two with 45.9 seconds to play.
Off a pair of Hornets offensive rebounds, Charlotte then got Walker to the line, where he made only the first of his two foul shots, making it a 92-91 game with 30.4 seconds left.
With Whiteside and Dragic watching from the bench by then, the Heat then got the 3-pointer off a disjointed possession from Ellington for a 95-91 lead with 4.6 seconds to play.
The Hornets opened the third quarter with a 22-4 blitz, with their eight-point halftime deficit eventually moving to a 15-point lead.
Only when the Heat went to the bench was there anything in the way of pushback, going then into the fourth quarter down 78-71.
The Heat entered 4-16 when trailing at the end of the third quarter, including 1 of 6 at home.
The Heat moved to a 10-point lead in the second quarter and went into halftime up 54-48, despite 19 first-half points from Walker. The Heat shot 50 percent in the first half, which was offset by eight turnovers, including three on James Johnson.
The Hornets pushed to a 26-22 lead at the end of the opening period, turning six Heat first-quarter turnovers into eight points. Richardson had seven first-quarter points for the Heat, with Walker with nine in the period for Charlotte.