DALLAS — Kristaps Porzingis made his first shot on a 3-pointer and later drove for a tying finger-roll layup that probably reminded the New York Knicks why the 7-foot-3 Latvian with unique offensive skills was once the future of their franchise.

The Knicks ended up with the most important thing in their first meeting with their former star: the win, just their second in nine games this season.

Marcus Morris scored a season-high 29 points, and New York overcame a career-high 38 points in another triple-double for 20-year-old phenom Luka Doncic, beating the Dallas Mavericks 106-102 on Friday night.

Porzingis, who scored 28 points, injured his left knee in his last game with the Knicks on Feb. 6, 2018. He didn't play again until making his Dallas debut this season when the Mavericks decided he wouldn't play last season following the blockbuster trade in January.

Almost exactly 21 months since that game, Porzingis played with a purpose early and helped erase a 12-point deficit in the second half, finishing 4 of 8 from 3-point range with nine rebounds and five blocks coming off perhaps his worst showing with the Mavericks.

"Out of all these games, I was probably the most relaxed out there," Porzingis said. "I just wanted to play well and tonight I took a step forward. Whoever it is, I just want to help this team win games."

With the score tied at 92, Porzingis shot an air ball from 3, and the Knicks soon went on a 9-0 run.

Morris, a free-agent addition in the off-season, started it with three free throws after Porzingis committed his fifth foul on a 3-pointer. Julius Randle, who grew up in the Dallas area and finished with 21 points, capped it with a jumper.

"I could see how guys would approach it a little extra," Morris said of the Knicks playing Porzingis. "But for me, I've been traded a few times, left some teams with bad tastes in their mouths, so I understand how it goes. It's not about him. It's about us."

Dallas was still within four when rookie R.J. Barrett missed two free throws, but Randle easily beat Porzingis to the rebound and made both free throws after drawing the sixth foul on the centerpiece of a blockbuster deal last January.

Doncic had 14 rebounds and 10 assists but also eight turnovers, one shy of the most of the reigning rookie of the year's career. He had a chance to tie after Taj Gibson missed two free throws with 25 seconds left, but pulled up for a 34-footer that bounced off the rim.

"I made a bad decision," Doncic said. "That wasn't the shot I was looking for. I let my team down again. I got to make better choices."

The Mavericks didn't get much help outside their new European pair. Tim Hardaway Jr., who also came to Dallas in the trade, had two late 3-pointers to keep Dallas close, but was just 5 of 15 from the field. He was the only other double-figure scorer for the Mavericks with 14.

Barrett, the third overall pick in 2019 after Doncic went with the same choice last year, scored a season-low three points on 1-of-9 shooting. He also missed five of six free throws.

"I wanted my kid to get over that hump tonight so I left him in there to see if he could overcome it," Knicks coach David Fizdale said. "He failed this time, but he'll get back on the horse and he'll make his next ones."

TIP-INS

Knicks: Bobby Portis had 14 points and 12 rebounds, and Frank Ntilikina had 14 points and four steals. ... The Knicks were 14 of 28 from 3, highlighted by Ntilikina making four of five. Morris was 4 of 8.

Mavericks: Doncic made consecutive 3s after starting 1 of 7 from long range, the same finishing total in the previous game against Orlando. He finished 3 of 11. ... After Porzingis, Doncic and Hardaway, the rest of the Mavericks were 8 of 27 from the field.

NO SMITH VS. MAVERICKS

Dennis Smith Jr., the key piece for New York in the Porzingis trade, missed his sixth straight game after the death of the point guard's stepmother. Smith rejoined the team in Dallas, but coach David Fizdale said Smith was probably another game away from returning.

Smith hasn't faced the Mavericks yet, but the teams play again in New York on Thursday. Dallas drafted him ninth overall in 2017, but his future with the Mavericks was clouded by Doncic's arrival as the third overall pick a year later.

DUELING CHALLENGES

Each coach used his challenge successfully late in the first half, but Rick Carlisle's was a little more important for Dallas because it erased a third foul on Porzingis when he appeared to block Ntilikina's one-handed dunk attempt. The reversal gave Porzingis his second block.

Fizdale challenged a charging call against Randle just 1:24 later, with the foul changed to a block on Maxi Kleber. Randle missed both free throws, though.

UP NEXT

Knicks: Cleveland at home Sunday. New York has lost 10 straight at home to the Cavaliers.

Mavericks: At Memphis on Saturday in their first back-to-back of the season. Coach Rick Carlisle said before the season the Mavericks were considering sitting Porzingis on the second night of back-to-backs in his return from the knee injury.

___

More AP NBA: https://apnews.com/NBA and https://twitter.com/AP_Sports