At first, it appeared the nightmare of every Jazz fan was playing out.

Rudy Gobert sat on the court in the third quarter, holding his right knee. Dion Waiters had just dived into it, scrapping for a loose ball. A video replay showed the knee had bent the wrong way.

It looked bad. But Gobert brushed aside the assistant coaches and teammates who had come to help him, and awkwardly limped his 7-foot-1 frame off to the locker room.

“Every time I get hurt, the best thing to do is to try to walk right away,” he said. “It’s a good sign usually. … When I saw I was able to walk, I felt better.”

When adversity hits, Gobert’s instinct is to keep moving forward. It didn’t save the Jazz (5-7) against the Heat on Friday night in an 84-74 loss, but it was a small positive note to hold onto looking ahead.

The Jazz defense had one of its best nights of the season — dreadful offense notwithstanding — and Gobert was key to pulling it together. The Heat shot worse inside the arc (38.4 percent) than outside it (40 percent), as Gobert intimidated in the middle. He added two blocked shots to his NBA-leading total, and helped limit Hassan Whiteside to only eight points.

After lapses on defense against the Philadelphia 76ers three nights before, Gobert was at least satisfied that the effort was stronger overall on that end. Utah finished with an 86.6 defensive rating, which would’ve been enough to win a game where they didn’t convert only four field goals in the second half.

Coach Quin Snyder said Gobert’s quick turnaround from his injury to re-enter the game in the fourth quarter helped spark the team to take a lead.

“Rudy’s a competitor — I don’t take that for granted, but I do expect that from him,” he said. “I thought toward the end of the fourth quarter, prior to that barrage, Rudy made some plays that gave us the lead.”

Those ways included making all three of his free-throw attempts, giving Utah a 71-all tie. On the next play, Gobert rebounded an Alec Burks miss and finished through contact, giving the Jazz a 74-71 lead.

Gobert also fought through knee pain to leap up for a monstrous block on Whiteside, with whom he seemed to share words with. It looked like it could be a spark for a Jazz rally.

The Heat responded instead with 13 unanswered points, giving Utah another loss and leaving several open-ended questions on offense.

But Gobert’s fighting spirit — that doesn’t seem to be a question at all.

“He’s a competitive guy,” Snyder said. “He’ll try to impact the game any way he can.”