Luka Doncic showed why he’s the most talked-about rookie in the NBA.

But Anthony Davis showed why he’s one of the most valuable veterans in the NBA.

Davis scored a season-high 48 points and grabbed 17 rebounds as the New Orleans Pelicans held off Doncic and the Dallas Mavericks, 114-112, on Friday night in the Smoothie King Center.

Doncic’s 3-pointer gave him 34 points and the Mavericks an one-point lead with 1:17 remaining, but Davis answered with a three-point play for the game’s final points with 43 seconds left.

“He was determined and he played hard,” Pelicans coach Alvin Gentry said of Davis, who made 20 of 32 field goals and scored 15 points in both the first and fourth quarters and played nearly 43 minutes.

Kushner: While Saints dance, Pelicans in jeopardy of losing superstar Anthony Davis

Julius Randle added 22 points and 12 rebounds and Jrue Holiday scored 18 for the Pelicans (16-20), who host Houston at 6 p.m. Saturday. That continues a stretch of three homes games in four days to close 2018 for New Orleans, which hosts Minnesota on Monday.

“We know we’re a better team than our record shows,” Davis said. “But we’ve got to prove it. Tonight we showed that we can go out and compete. We’ve got to get back to playing defense. We did that in the second half tonight.”

Doncic made 7 of 10 3-pointers and 10 of 16 field goals.

“He’s a hell of a player,” Davis said. “He has so much in his game.”

Harrison Barnes added 21 points, Dennis Smith Jr., returning after a six-game absence due to a sprained right wrist, had 14, Dirk Nowitzki 11 and Dwight Powell 10 for the Mavericks, who ended a six-game losing streak by beating the Pelicans 122-119 on Wednesday in Dallas.

The Mavericks, who made 15 of 32 3-pointers for the game, took an 11-point halftime lead after they made 10 of 19 3-pointers in the first half while the Pelicans made 1 of 13 on their way to finishing 4 of 23.

“We came out in the second half with a lot of energy and a lot of force,” Davis said.

Randle attributed that to a tongue-lashing Gentry gave his players in the locker room at halftime.

“It wasn’t a G-rated speech,” Gentry said.

Doncic made a 3-pointer to help Dallas extend the lead to 15 early in the third quarter before the Pelicans made a push.

Randle made four baskets as New Orleans climbed within five points.

After Barnes made a 3-pointer and Smith converted a three-point play, the Pelicans made another run. Ian Clark made a 3-pointer and Davis and Solomon Hill each made a free throw as the Mavericks’ lead shrunk to 88-86 after three quarters.

New Orleans finally caught up early in the fourth quarter and the score was tied at 94, 96, 99 and 101 before Randle’s layup gave the Pelicans a 103-102 lead.

The score was tied three more times before Davis jumper gave New Orleans a 111-109 lead with 2:12 left.

Doncic’s 3-pointer gave Dallas a one-point lead but Davis answered with the decisive three-point play.

Smith missed a jumper and Davis rebounded for New Orleans, which called timeout.

Davis missed a step-back 3-pointer and the Mavericks rebounded with four seconds left.

After a time-out they cleared out for Smith, who dribbled across the key and penetrated, but didn’t get a shot off before the clock expired.