MIAMI (AP) -- These are the games where Goran Dragic likes to prove his worth, the ones against a fellow All-Star point guard.
And make no mistake, Portland's Damian Lillard was great.
But when it mattered most, Dragic came through for Miami.
Miami led by as many as 19, then found itself trailing twice in the fourth quarter and pulled out a late rally on a night when Lillard went for 42 points.
''We knew they were going to make their run,'' said Dragic, who went over the career 10,000-point mark in the first half. ''We knew we just had to stick to our game plan and we did.''
Lillard played through what he said was ''a little hyperextension'' of his right elbow, something that happened when he got caught on a screen, but he still made 15 of 28 shots.
''I knew that it would eventually be a game,'' Lillard said. ''That's what we do. We kept grinding.''
Kelly Olynyk and Dwyane Wade each had 19 for Miami, which got 14 from McGruder, 11 from Richardson and a 16-rebound, six-block effort from Hassan Whiteside.
CJ McCollum scored 19 for Portland, and Zach Collins finished with 13.
''I thought they made some timely shots,'' Portland coach Terry Stotts said.
Lillard's 3-pointer with 5:38 left gave Portland its first lead since the opening minutes at 99-96, and a pair of free throws by Collins kept the Trail Blazers' lead at three with just under four minutes left.
From there, it was all Miami - sparked by a brilliant play from Dragic.
In transition, he slowed at the top of the 3-point arc knowing that he was about to get slammed into by Collins. The foul got called, Dragic made two of the three free throws, and his 3-pointer with 2:34 left put Miami ahead for good.
''It turned the momentum or at least showed it down,'' Heat coach Erik Spoelstra said. ''A very heady play.''
Trail Blazers: Lillard eclipsed the 11,000-point mark; he came into the night 31 shy of that, and had 32 through three quarters. ... Portland was outscored by 11 points in the opening quarter. The Blazers hadn't lost any quarter by more than four points in their first four games. ... Moe Harkless played 10 first-half minutes, and then didn't return because of left knee soreness. ... The 111 points were a season low for Portland.
Heat: Dragic became the first Slovenian player to reach the 10,000-point mark in the NBA. He entered with 9,994. ... Wade made four 3-pointers in the first half - the first time he had four 3s in a half since Nov. 19, 2016, for Chicago against the Los Angeles Clippers. ... Justise Winslow (hamstring tightness) made his season debut and finished with 10 points. Wayne Ellington (ankle) was cleared to make his, but did not play.
Wade sparked an immediate 9-0 run the first time he checked into the game, and before long the Heat had total control of the early going. His fadeaway 3-pointer less than 2 minutes into the second gave Miami a 41-22 lead, the end of what was a 28-7 Heat spurt that took about 7 1/2 minutes. Wade's falling-down, from-behind-the-backboard 3 with less than a second left sent Miami into the break with a 57-42 cushion. ''I didn't even see it go in,'' Wade said.
The loss lowered Stotts' career record to 390-390. While his Portland teams have consistently been very good, his career record has somehow never been better than two games over .500.
Trail Blazers: Visit Indiana on Monday.
Heat: Host Sacramento on Monday.
More AP NBA: https://apnews.com/NBA and https://twitter.com/AP-Sports