MIAMI (AP) — Brooklyn got another win. Now the Nets have to hope for good news on Kevin Durant.

Royce O’Neale’s putback with 3.2 seconds left put Brooklyn to stay, and the Nets beat the Miami Heat 102-101 on Sunday night in a game where Durant left in the third quarter with a right knee injury.

“Right knee, he’ll get evaluated tomorrow and then hopefully I’ll have some more info,” Nets coach Jacque Vaughn said. “Most likely it will include imaging, just to make sure we’re good.”

Durant was awaiting his teammates after the big finish, giving them all fist bumps as they walked into the locker room. Vaughn said he did not ask Durant how he was feeling, though Kyrie Irving said his friend was in good spirits.

Durant left with 36.6 seconds left in the third quarter, not long after he appeared to get hurt on a drive by Miami’s Jimmy Butler. Durant grabbed at his right knee after Butler, who had just driven to the basket, landed with his back to Durant and fell into him.

“Those plays are scary, because when someone’s not looking what’s going on, anything can happen in those moments,” Irving said. “So I’m grateful for all that time he’s put in the weight room putting his body in a great position, and his body was able to save him from something worse.”

Durant took two big hits in the second half. He also grabbed at the knee after being called for an offensive foul on a drive where he collided with Miami’s Kyle Lowry with 7:57 left in the third.

“You never want to see him go down like that,” Vaughn said. “Any player, for that matter. Pretty hard collision, but you’ve got to give our group credit for staying with it.”

Irving scored 29 to lead the Nets, who have won 18 of their last 20 — after winning only nine of their first 20 games. Durant had 17 before departing and Seth Curry scored 14 for Brooklyn.

Nic Claxton had 13 points and 11 rebounds for the Nets.

Butler scored 26 for Miami, which got 24 from Tyler Herro. Butler missed a contested shot at the rim on the game’s final play, and Herro was shaken up on it as well before limping off — replays showing he may have slipped.

“Jimmy made the absolute right play,” Heat coach Erik Spoelstra said, after the team argued for a foul to no avail.

Spoelstra said Herro indicated postgame that he was fine, but the team will know more Monday. Bam Adebayo was limited in the second half because of a right hand contusion — X-rays were negative — and scored 10 for Miami, as did Max Strus and Haywood Highsmith.

Brooklyn led 66-64 at the half, with Irving leading the Nets with 24 and the teams both shooting well — 54% for Miami, 57% for Brooklyn.

And then in the third, the defenses showed up.

Brooklyn shot 28% in the quarter, Miami 25%, and the Heat outscored the Nets 18-13 in the period to take a three-point lead into the fourth.

Miami led by as many as nine in the final quarter, went up 101-100 on back-to-back baskets by Butler late, but couldn’t corral the rebound on Irving’s missed 30-footer in the final seconds. O’Neale got the rebound and turned it into the eventual winner.

“I was just right there to finish it,” O’Neale said.

TIP-INS

Nets: Claxton blocked three shots and has at least three blocks in six consecutive games. Only the Lakers’ Anthony Davis has done that this season, and no Nets player has done that since Shawn Bradley had two separate 11-game streaks in 1996.

Heat: NBA Commissioner Adam Silver was in attendance, as was DJ Khaled. … Caleb Martin (left quadriceps strain) was out. … Lowry and Victor Oladipo each were 2 for 10. … Miami is 21-20 at the season’s midway point.

DURANT MILESTONE

Durant needed just two points to pass Dominique Wilkins (26,668) for 14th on the NBA’s career scoring list. With 17 on Sunday, Durant is up to 26,684.

He’s 26 points away from No. 13 Oscar Robertson (26,710).

PLAYOFFS

The Miami Dolphins snapped a five-game losing streak and will play Buffalo in the NFL wild-card round this weekend. If the Heat make the playoffs this season, it’ll mark the first time since 2009 that Miami’s NBA and NFL teams play postseason games in the same year.

“It’s been great for the city,” said Spoelstra, who spent a day with the Dolphins during their training camp. “I just enjoy seeing teams come together, particularly when there is adversity and figuring some things out.”

UP NEXT

Nets: Host Boston on Thursday.

Heat: Host Oklahoma City on Tuesday.

___

AP NBA: https://apnews.com/hub/NBA and https://twitter.com/AP_Sports