DALLAS (CBDSFW.COM/AP) — Luka Doncic grew up idolizing LeBron James, and now the young NBA prodigy has joined James in the record book.

The Dallas Mavericks needed everything Doncic delivered in a sensational performance Monday night.

Doncic scored a career-high 42 points to go with 12 assists and 11 rebounds as the Mavericks held off the skidding San Antonio Spurs 117-110. The 20-year-old second-year guard joined James as the only players in league history younger than 21 to have a 40-point triple-double.

“It feels like every day there are stats you don’t know about, stats that you read about,” Doncic said. “It’s great to hit.”

Dallas led wire to wire but had to fend off a late Spurs rally, with Doncic hitting a 3-pointer with 26.5 seconds to play that put Dallas up 115-110 after the Spurs had rallied from 14 down at the start of the quarter.

Doncic has an NBA-leading six triple-doubles in just 13 games this season.

“This guy can do anything he wants to on a basketball court,” Mavericks coach Rick Carlisle said. “He’s having one of those magical runs right now. It’s a phenomenal thing to watch. It’s a phenomenal thing to be a part of.”

Dallas also got a career-high 22 points from Dorian Finney-Smith, and Kristaps Porzingis added 18 points and 10 rebounds.

The Spurs have lost six in a row, their longest slide since 2011, and dropped eight of nine since a 4-1 start. They’re off to their worst start since 1996-97, the season before they drafted former star and current assistant coach Tim Duncan.

DeMar DeRozan scored a season-high 36 points for the Spurs, helping to lead a fourth-quarter surge after they trailed 93-79 entering the period.

“When adversity hits you can’t run from it, you can’t shy away from it, you can’t let it get you down,” DeRozan said. “Try to channel that energy and put it in the right place so we can understand why we got beat.”

The Mavericks host the Golden State Warriors Wednesday night at 6:30 p.m.

(© Copyright 2019 CBS Broadcasting Inc. All Rights Reserved. The Associated Press contributed to this report.)