The Boston Celtics looked like they were going to suffer a hangover loss to the lowly Miami Heat at TD Garden on Friday night. Then Isaiah Thomas put on his cape and came to the rescue, scoring a career-high 52 points, including a franchise-record 29 in the fourth quarter, to give the C’s a narrow 117-114 win.

With Avery Bradley sidelined with an illness, Thomas put it all on his shoulders, and the Celtics needed everything he gave them.

Here’s how it all went down.

PG: Isaiah Thomas
SG: Marcus Smart
SF: Jae Crowder
PF: Amir Johnson
C: Al Horford

Horford got off to a hot start, pouring in nine points in the opening period. However, the Celtics couldn’t take advantage of it as Heat forward Justise Winslow stuffed the stat sheet early with seven points, five rebounds and two assists.

The Heat came into the game ranked 26th in field-goal percentage at 43.7 percent, but they shot a touch over 50 percent in the first 12 minutes thanks to great play from their bench. The C’s bench performed admirably in the first quarter, and center Kelly Olynyk and rookie forward Jaylen Brown helped keep the game tied at 25 after one with this hook-up.

Thomas started his takeover with the Celtics trailing by seven midway through the second. The star point guard scored 14 points in the second quarter and did so in a variety of ways.

Thomas hit back-to-back 3-pointers to close the gap to one, then drove into the paint for a nifty layup to give the C’s the lead. The Celtics struggled to string together stops against the Heat, but Thomas went on a mini 4-0 run to end the quarter to give the Celtics the lead.

The Celtics’ lead remained at four entering the fourth. After Miami began the fourth quarter on an 11-2 run, Thomas reentered the game and began his assault on the record books.

The star went into I-got-this mode, scoring 14 points over the first six minutes of the stanza to keep the C’s afloat. Thomas’ hot shooting brought some energy to the rest of the team, as Terry Rozier forced a turnover and then hit the streaking Brown for a monster dunk to bring the lead to six.

Even with Thomas burning the house down, the Heat wouldn’t go away. Guard Tyler Johnson hit back-to-back jumpers to bring Miami to within three, but Thomas refused to let the Celtics fall at home. After the Heat missed a layup, Thomas slashed into the lane, took a pass from Crowder, absorbed a hit and finished to put the lead back to six.

The Heat made one final push to cut the lead to two with under a minute to play. With 41 seconds left, Thomas buried his ninth 3-pointer of the game to put an exclamation point on his historic night. His nine triples tied him with Antoine Walker for most made 3-pointers in a game in franchise history.

This was the dagger.

The Celtics will welcome the Utah Jazz to TD Garden on Tuesday night. Tip-off is scheduled for 7:30 p.m. ET.

Thumbnail photo via Winslow Townson/USA TODAY Sports Images