LOS ANGELES (AP) — When LeBron James hit the driving layup that pushed him past Michael Jordan into fourth place on the NBA's career scoring list, even the Denver Nuggets paused to appreciate their opponent's big moment.

The Nuggets then made sure James' celebration didn't include a huge come-from-behind win for the Lakers.

Will Barton scored 23 points, Gary Harris added 19 and the Nuggets snapped their three-game losing streak with a 115-99 victory over Los Angeles on Wednesday night despite James' latest move up the career scoring ranks.

James scored 31 points and surpassed Michael Jordan's 32,292 career points on a driving layup during the second quarter.

"You've got to appreciate him," Harris said of James. "We're witnessing greatness. It's an honor."

With James playing alongside four youngsters who came in with a combined 200 games of NBA experience compared to LeBron's 1,190, the Lakers nearly rallied from a 23-point deficit in the fourth quarter.

Denver (43-21) blew all but two points of its huge early lead, but Harris and Nikola Jokic contributed key baskets down the stretch of the Nuggets' first win of March.

"I liked how we played for most of the game, aside from the stretch where they just got out and ran and scored at will," Denver coach Michael Malone said.

Jamal Murray scored 19 points and Jokic had 12 points, 17 rebounds and eight assists for the Nuggets, who had lost four straight to the Lakers on the road despite their growth into an elite NBA team during that time period.

After James barreled to the basket and hit a layup while being fouled for his milestone points, the Staples Center crowd gave a rousing ovation to the superstar who joined the Lakers last summer after 15 NBA seasons spent with Cleveland and Miami. While the Lakers aired a tribute video during the ensuing timeout, James covered his face with a towel, apparently crying under it.

"A lot of stuff that I've done in my career, this ranks right up at the top (with) winning a championship," James said. "For a kid from Akron, Ohio, that needed inspiration and needed some type of positive influence, M.J. was that guy for me. I watched him from afar, wanted to be like M.J., wanted to shoot fadeaways like M.J., wanted to stick my tongue out on dunks like M.J., wanted to wear my sneakers like M.J. I wanted kids to look up to me at some point like M.J., and it's crazy, to be honest. "

The 34-year-old James began the night needing 13 points to pass one of his heroes. James now trails only Kareem Abdul-Jabbar (38,387 points), Karl Malone (36,928) and Kobe Bryant (33,643).

TIP-INS

Nuggets: Trey Lyles missed his seventh straight game with a strained left hamstring. ... Paul Millsap had 16 points and eight rebounds, along with a technical foul for arguing.

Lakers: Josh Hart scored seven points on his 24th birthday while starting in Kyle Kuzma's spot. ... LA went 12 for 23 on free throws, including a 1-for-8 start with four straight misses by James. They also missed three free throws after technical fouls. The Lakers are the NBA's worst free throw shooting team. ... Lance Stephenson returned and scored three points after missing three games with a sprained toe. ... Tyson Chandler also missed his second straight game with a stiff neck.

MAJOR INJURIES

JaVale McGee added 16 points for the Lakers, who played without injured starters Brandon Ingram, Kuzma and Lonzo Ball. Ingram missed his second straight game with a shoulder injury, and Kuzma joined him after spraining his ankle Monday. The Lakers already were without Ball, who has been out with a sprained ankle and a bone bruise for six weeks.

SURPRISE LINEUP

The Lakers' surprising fourth-quarter rally happened with a lineup including rookie Moe Wagner, who scored 11 points, and Johnathan Williams, who hadn't played for the Lakers since late December. Seldom-used backup point guard Alex Caruso had 15 points and six rebounds in an outstanding performance in just his eighth NBA game of the season.

"We've been playing together for a lot of the year," Caruso said of Williams, his frequent teammate with the G League's South Bay Lakers.

UP NEXT

Nuggets: At Golden State on Friday night.

Lakers: Host Boston on Saturday night.

More From 1460 ESPN