DALLAS — 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.”

KEY SEQUENCE

With Dallas up 110-107, both Bryn Forbes and Patty Mills missed potential game-tying 3s. On the ensuing possession, Porzingis lost the ball going up to shoot but Finney-Smith scooped it up and fired an off-balance 20-footer as the shot clock expired. It fell through to put Dallas up five.

“I looked at the clock, and it just bounced right to me and I threw it up,” Finney-Smith said. “Exactly like we drew it up.”

After Rudy Gay’s 3 brought the Spurs back within two, Doncic stepped back and hit the 3 that finally finished off San Antonio.

FINNEY-SMITH EMERGES

Finney-Smith shot 8 for 10 from the field, including three 3s. All the more impressive was that the fourth-year wing, who has built a reputation with his defence, had his career game while also drawing a tough assignment in DeRozan.

“I think I owe (Carlisle) some money because I said I wouldn’t go for his pump fake, and he got me one time,” Finney-Smith said.

TIP-INS

Spurs: Coach Gregg Popovich talked about Duncan, in his first season as an assistant coach: “His mere presence is valuable. When a young kid has Tim Duncan put his arm around them and guide them in a certain way, give them a piece of advice, that’s way more important than what I can do.”

Mavericks: This was their first matchup with the Spurs since the retirement of Dirk Nowitzki, who played against the Spurs 78 times in the regular season — more than any other team. Nowitzki also faced San Antonio 36 more times in the playoffs over six series between 2001 and 2014.

UP NEXT

Spurs: At the Washington Wizards on Wednesday.

Mavericks: Host the Golden State Warriors on Wednesday.

___

More AP NBA: https://apnews.com/NBA and https://twitter.com/AP-Sports