The Dallas Cowboys and quarterback Dak Prescott have agreed to a four-year, $160 million contract, including $126 million guaranteed, a source told ESPN’s Adam Schefter on Monday.

The deal, which is technically for six years but voids to four so as to help Dallas against the salary cap, can be worth up to $164 million.

Prescott’s signing bonus is $66 million, the highest in NFL history, with a record $75 million due in Year 1, Schefter reported. The first three years of the deal average $42 million per year, according to a source.

The Cowboys announced they had agreed to a contract with Prescott but did not disclose terms. The Cowboys will place the franchise tag on Prescott on Tuesday as a procedural matter, a source told Schefter. The Cowboys announced they will hold a news conference Wednesday.

Prescott’s salary-cap number for this season will be $22.2 million instead of the $37.7 million that would have come along with the franchise tag, a savings of $15.5 million against this season’s cap, Schefter reported.

The process to reach a long-term deal with Prescott covered three offseasons, multiple mega-million offers and hours of negotiations. The Cowboys, all along, said they wanted Prescott to be their franchise quarterback for the present and future, and Prescott said he wanted to remain with the Cowboys.