The Dallas Mavericks and restricted free agent Kristaps Porzingis reportedly agreed to a five-year contract Sunday.

The Mavericks and Porzingis agreed to a max contract worth $158 million, The Athletic reported. Porzingis missed the entire 2018-19 season while recovering from a torn ACL.

NEW YORK KNICKS FEEL THE HEAT AFTER LOSING OUT ON MARQUEE FREE AGENTS

The deal cannot become official until Saturday, due to the league’s annual moratorium period.

Dallas acquired Porzingis in a trade with the New York Knicks during the season. The Knicks sent Porzingis, Trey Burke, Tim Hardaway Jr. and Courtney Lee to the Mavericks for DeAndre Jordan, Wesley Matthews, Dennis Smith Jr. and two draft picks.

The 23-year-old Latvian star is expected to be the one-two punch with Luka Doncic to help lead the Mavericks into the post-Dirk Nowitzki world.

LEBRON JAMES 'GIFTING' NO. 23 TO ANTHONY DAVIS AMID ANTICIPATED TRADE TO LOS ANGELES LAKERS: REPORT

Porzingis, who was an All-Star before tearing his ACL in his last full season with the Knicks, averaged 22.7 points and 6.6 rebounds per game before the injury.