MIAMI (AP) Dwyane Wade knew the Boston Celtics would make a run.

He also decided when it should end.

Wade scored eight of his 19 points in a third-quarter spurt that saved Miami from what was starting to look like a freefall, and the Heat went on to defeat the Celtics 115-99 on Thursday night. Miami led by as many as 26 shortly after halftime, then saw the Celtics peel off 16 unanswered points before Wade helped quickly restore order.

''I've been on this train with him for a long time,'' Heat coach Erik Spoelstra said. ''He has a way of making all of us look a lot better. ... Sometimes this league is just about having great players in those important moments, swing moments during the course of a game.''

Josh Richardson scored 18 points for Miami, which set season highs with 18 3-pointers and 33 assists. Derrick Jones Jr. scored 14, and Justise Winslow scored 13 points and added a career-high 11 assists for the Heat.

''We're trying to move up. We're trying to continue to get better,'' said Wade, who helped the Heat even their record at 20-20. ''You want to be able to win some of these games against the top teams.''

Kyrie Irving led all scorers with 22 on 10-for-19 shooting for the Celtics, who scored a season-high 135 points one night earlier in a win over Indiana - but were held under 100 for only the fourth time all season, the first since Nov. 17.

Irving went to the Heat practice court immediately after the game, shooting for about 30 minutes.

''Just good to get some shots up, just release some stress a little bit after a tough loss,'' Irving said.

Marcus Smart scored 18, and Jayson Tatum and Marcus Morris each had 17 for the Celtics.

Miami outscored Boston 17-4 in the final 3:07 of the first half and took a 61-43 lead into the break - the largest halftime edge for the Heat since November. And an 11-3 run to start the third pushed the lead out to 72-46, which would seem to indicate that Miami was in complete control.

Looks were deceiving.

Boston scored the next 16 points, with Tatum getting six of them and the Celtics were right back in the game. Wade made a 3-pointer to stop the run, and scored eight points in the final 3:47 of the quarter as the Heat took an 83-72 lead into the final 12 minutes.

Tyler Johnson got a pair of 3s to fall in a 67-second span early in the fourth, and just like that Miami was back up 95-76.

''They really, really shot it and made big ones when we came back in the second half to stymie that,'' Celtics coach Brad Stevens said. ''But that's a result of being comfortable all night.''

TIP-INS

Celtics: Boston trailed for 4:04 in its last four games, combined. It trailed for 4:14 in the first quarter alone Thursday. ... Boston has now lost three straight to Miami, the first time that's happened since 2012.

Heat: It was Miami's 400th consecutive home sellout. ... Winslow wore ''RIP Sammy Farkas'' on his sneakers, a tribute to a Miami Beach teen who died in a fall earlier this week. ... Jones made a 40-footer to end the first half, and had a 60-footer to end the third quarter hit the rim and bounce off. ... James Johnson got rave reviews from teammates for dunking on Irving in the opening minutes. ''Definitely nice,'' Tyler Johnson said.

HELLO, AGAIN

Boston and Miami didn't play each other in 2018 - the last meeting between the clubs, before Thursday, came on Dec. 20, 2017. The Celtics played every other NBA team at least once in 2018; the Heat played every team besides Boston and Golden State, who they last faced on Dec. 3, 2017 and won't see for the first time this year until Feb. 10 in Oakland.

NOTHING EASY

The game's first free throw came more than 17 minutes after tip-off, when Winslow got to the line for Miami. Boston didn't take a free throw until 10:31 remained in the third quarter.

UP NEXT

Celtics: Visit Orlando on Saturday. Boston is 7-2 in its last nine games against Orlando.

Heat: Host Memphis on Saturday. It'll be the 41st game - the midpoint - of Miami's season.

---

More AP NBA: https://apnews.com/NBA and https://twitter.com/AP-Sports

Copyright 2019 by AP. Any commercial use or distribution without the express written consent of AP is strictly prohibited.