DENVER -- Andre Iguodala scored on a driving layup with 2.8 seconds left, and the Denver Nuggets rallied to beat the Dallas Mavericks 95-94 for their franchise-tying 19th straight home win.
Corey Brewer had 23 points and Andre Miller scored 22 for the Nuggets, who held onto the third spot in the Western Conference with a costly win when starting forward Danilo Gallinari was lost to a left knee injury in the first half and didn't return.
Gallinari's left knee buckled as he drove the lane with 4:27 left in the second quarter. He fell to the floor and grabbed his knee in pain before being helped off the court by teammates Timofey Mozgov and Quincy Miller.
Gallinari will have an MRI on Friday morning.
The injury seemed to have an impact on the Nuggets. While they rallied to tie the game at halftime, Dallas controlled the third and took a 77-70 lead into the fourth.
The Nuggets came back to tie the game at 86 on Iguodala's 3-pointer with 4:39 left. The Mavericks led 94-93 in the final minute when Dirk Nowitzki blocked Iguodala's layup attempt with 35 seconds left.
Brewer stole the ball from Nowitzki and Kenneth Faried was fouled with 10.8 seconds left. He missed both free throws but Brewer snuck in and got the rebound, setting up Iguodala's drive at the end.
The Mavericks had one last chance but Brewer blocked Anthony Morrow's shot at the buzzer.
The loss was a blow to Dallas' playoff chances. The Mavericks fell 3.5 games behind the Los Angeles Lakers for the eighth and final playoff spot in the Western Conference.
Brandon Wright led Dallas with 16 points and Nowitzki and Chris Kaman had 13 each.
If Gallinari's injury is serious it means the Nuggets are without their top two scorers for the stretch run of the season - and possibly the playoffs. Leading scorer Ty Lawson has missed six of the last seven games with a strained right heel/torn plantar fascia and isn't expected back for at least another week.
While Lawson will probably return, Gallinari could be lost for a long time. He couldn't put weight on the leg and was carried to a wheelchair in one of the tunnels off the court. It was a scary sight or a team that had gone 34-7 before Friday and started thinking about a deep postseason run.
NOTES: Mavericks forward Elton Brand was out with a sore right calf. He first injured it against Indiana on March 28 but played in the next two games. Dallas coach Rick Carlisle said Brand is day to day. ... Nuggets guard Andre Miller doesn't play as fast as Lawson, but he keeps his team playing at an up-tempo pace because of his court vision and playmaking ability. Carlisle is impressed with the way Miller runs the team. "Look at the last couple of games, they're still putting up astronomic numbers. (Evan) Fournier stepped in, he's had two career games, so they haven't missed a beat. And you know what Andre Miller is perceived to lack in speed, he makes up for in vision and just the ability to throw the ball ahead. There's nobody in this league that can run faster than his passes get thrown up the floor." ... Faried was sporting neon green shoes and center JaVale McGee had green wrappings on his calves during NBA's Green Week.