SALT LAKE CITY (AP) -- It was scary for Utah when Denver rallied from a 16-point deficit to take a brief lead, then downright horrifying when star guard Deron Williams went crashing to the floor on a flagrant foul.
The Jazz survived both Saturday night and stayed in contention for home-court advantage in the first round of the playoffs by beating the Nuggets 124-97.
"It was a big win. We can still get home-court advantage if we win out," said Williams, who finished with 19 points and 11 assists.
Williams also had a bruise after landing on his backside after a flagrant foul by Carmelo Anthony during a 12-2 run that put the Jazz up for good late in the third quarter. Williams averages 19 points and more than 10 1/2 assists for the Jazz, so his teammates and Utah's fans anxiously waited for him to get up as he stayed on the floor under the basket in obvious pain.
"I thought it was a tough foul, but I didn't think it was a flagrant foul," Denver coach George Karl said. "I didn't think Melo had any desire to hurt Deron."
The Jazz can't afford to lose their top playmaker and second-leading scorer. They also can't afford any more losses as they try to make a late run in the Western Conference standings and secure the home court for the opening round.
Utah moved within 1 1/2 games of Houston, which visits Denver on Sunday and Utah on Monday, and San Antonio for the No. 3 spot in the Western Conference.
Mehmet Okur added 20 points and 15 rebounds for the Jazz, who won three of four against their Northwest Division rivals for the third straight season and kept the Nuggets from moving closer to the final Western Conference playoff berth.
Denver still controls its own postseason destiny with two games remaining, but the Nuggets did little to help themselves Saturday as they closed out a four-game road trip.
The Jazz had 37 assists on 50 field goals and outrebounded the Nuggets 44-36. Denver gave Utah a little more help by going 24-for-40 from the foul line.
The Nuggets host Houston on Sunday and Memphis on Wednesday. They dropped into a tie with Golden State in the race for eighth place, though Denver owns the tiebreaker.
"There is no tomorrow after tomorrow if we don't take care of business," said Allen Iverson, who led Denver with 28 points.
Anthony had 22 points for the Nuggets, who allowed 40 points in the first quarter, then opened the second on a 14-0 run, Denver held a one-point lead about midway through the third, but the Nuggets unraveled just as quickly as they had come back.
"I don't know where the game went wrong to be honest with you," Anthony said. "In the third quarter they had the momentum going with them and just carried it over throughout the rest of the game."
Utah improved to 36-4 at home, where it hopes to open the playoffs. The Jazz host Houston on Monday and close the regular season Wednesday on the road against the Spurs. Utah hasn't won in San Antonio since 1999, so winning the remaining home game is crucial.
Anthony pulled Denver within 74-73 on a jumper, then Utah took off on a 12-2 run that was briefly interrupted when Williams went crashing to the floor after he was fouled by Anthony. Anthony caught Williams up high with both arms and sent the Jazz guard crashing to the floor on his tailbone.
The fans switched to chanting "MVP!" as Williams went to the line and made both free throws to give the Jazz an 80-73 lead, then limped toward the Jazz bench. He spent a few moments in the tunnel stretching and trying to jog off the pain before returning to the bench.
The Jazz led 90-79 at the end of the third, then outscored the Nuggets 34-18 in the final period. Everything was falling at the end for the Jazz, including an out of control layup by Paul Millsap after he was spun around and was going backward toward the hoop. Millsap threw the ball up and it banked in to give Utah a 96-81 lead.
Utah opened the game 9-for-10 and led 40-25 at the end of the first. ... Iverson scored six as the Nuggets opened the second quarter with 14 straight points. ... Iverson scored 12 in the first quarter and Anthony had 10 points in the period. The rest of the Nuggets combined for three points in the first.