DALLAS — Just five days after his 21st birthday, Luka Doncic continued to etch his name in the Dallas Mavericks’ record book.

And in his first matchup against fellow young star Zion Williamson, Doncic got the last word — and the win.

The second-year star scored 30 points and broke Jason Kidd’s franchise record for career triple-doubles with his 22nd, helping the Mavericks hold off the New Orleans Pelicans 127-123 in overtime Wednesday night.

The nationally televised matchup between Doncic and Williamson lived up to the hype. Doncic had 17 rebounds and 10 assists, and his 3 with 1:10 to play in overtime snapped a 118-118 tie and gave the Mavericks the lead for good.

And he did it with a nagging thumb injury that required X-rays after the game.

“It hurts, but you’ve got to get through it,” Doncic said. “You’re probably going to get hit every game, almost every game, so you’ve just got to fight through it.”

Luka Doncic makes a pass around Zion Williamson during the Mavericks' 127-123 OT win over the Pelicans.
Luka Doncic makes a pass around Zion Williamson during the Mavericks’ 127-123 OT win over the Pelicans.NBAE via Getty Images

Former Knick Kristaps Porzingis had 34 points and 12 rebounds for Dallas, and his dunk off a feed from Doncic gave Dallas a 123-119 lead — and gave Doncic his triple-double.

Williamson scored 21 points in 35 minutes while playing back-to-back games for the first time in his young NBA career. He has scored double figures in all 17 games he’s played in and has 20 points or more in his last 13.

“I think my game is progressing,” Williamson said. “Still getting my legs under me, just learning the game. The NBA, these are the best players in the world. They’re smart. They have high IQs for the game. They have scouting reports, so I think it’s just bringing something new to the table every game.”

Brandon Ingram led New Orleans with 27 points, but fouled out in overtime. Lonzo Ball added 25, including shooting 7 of 9 on 3-pointers.

The Pelicans’ Nicolo Melli sent the game to overtime with a tying 3 with 7.4 seconds left after missing his first six 3s of the game.

The Mavericks led by as many as 11 in the first half, but New Orleans kept it close. Dallas led by two at the end of each of the first three quarters.

Williamson gave New Orleans its first lead at 75-73 when he drew contact with Maxi Kleber, who fell to the ground without a call, giving the Pelicans rookie a clear path for a dunk.

New Orleans missed a crucial chance to move up in the standings as they try to capture a playoff spot. The Pelicans are now five games behind current eighth-seed Memphis in the Western Conference.

“We can’t look ahead to other games,” Ingram said. “We just look at what’s in front of us and figure out the best gameplan and scheme that we have and try to go execute.”