New Orleans Pelicans forward Zion Williamson (1) and Dallas Mavericks guard Luka Doncic (77) watch play during the first half of an NBA basketball game in Dallas, Wednesday, March 4, 2020. (AP Photo/Michael Ainsworth)

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

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’ NicoloMelli 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.

TIP-INS

Pelicans: G J.J. Redick remains out with a left hamstring strain.

Mavericks: Dallas swept the season series, 4-0, but Williamson missed all three among the 44 games he sat out after arthroscopic knee surgery. … Coach Rick Carlisle said starting forward and defensive specialist Dorian Finney-Smith suffered a hip flexor injury in the first half that limited him to less than 10 minutes.

RUNNING UPHILL

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

CLOSERS WANTED

Dallas was just 5-15 in games decided by five points or less before Wednesday, and the Mavericks survived a see-saw fourth quarter in which neither team led by more than three points. Winning more games like this will require both their young stars to become effective finishers.

“(Luka) is running the show with KP,” Dallas coach Rick Carlisle said. “That’s how we play it. This is where that group has to continue to grow.”

Porzingis said he and Doncic relish the challenge.

“We both, I think, are very similar,” Porzingis said. “We have high expectations of ourselves. We are the harshest critic, in a way, for ourselves.”

BLOCK PARTY

The Mavericks set a franchise record with 11 blocks in the first half, three of those at Williamson’s expense. After Kleber swatted away one of his shots, Williamson crashed to the floor and got up shaking his head.

Dallas’ previous high was 10 blocks in a half against Philadelphia on Jan. 29, 2005.