Quarterback Dak Prescott is remaining with the Dallas Cowboys, and this time it’s more than a one-year arrangement. He and the Cowboys reached an agreement Monday on a contract that will pay Prescott about $160 million over the next four seasons, according to a person familiar with the terms.

The long-running negotiations between the Cowboys and Prescott’s representatives over a multiyear deal, which spanned the past few offseasons, finally resulted in a contract that satisfied both sides. The Cowboys ensured that they will retain their franchise player over the next four years and reduced Prescott’s impact on their 2021 salary cap. Prescott, 27, becomes one of the NFL’s highest-paid players and preserved his eligibility to hit the free agent market in four years, when he still will be in the prime of his career.

The Cowboys announced the agreement Monday without confirming the terms of the contract. The team said it will provide further details Wednesday.

Prescott played in only five games in 2020 before having his season ended by a fractured ankle. He was off to a superb start before suffering the injury during a Week 5 game against the New York Giants. Prescott is a two-time Pro Bowl selection in his five seasons with the Cowboys and has thrown for 17,634 yards and 106 touchdowns. He was the NFL’s offensive rookie of the year in 2016.

He turns 28 in July and is expected to be healthy for the 2021 season. The Cowboys will be trying to rebound from a disappointing performance in Coach Mike McCarthy’s first year. They went 6-10 and missed the playoffs for a second straight season, although they remained in the running for the NFC East title until the final day of the regular season.

Prescott would have been eligible for unrestricted free agency next week. The Cowboys also could have kept him off the free agent market by using their franchise-player tag, which would have resulted in a one-year deal worth $37.7 million. Prescott played last season under a one-year franchise-player deal worth $31.4 million and, under NFL rules, would have been entitled to a 20 percent raise if he had been tagged again.

That was a scenario both sides wanted to avoid. Having Prescott on another franchise-player deal would have been cumbersome against the salary cap for the Cowboys. It also would have created a scenario in which Prescott, as once happened with quarterback Kirk Cousins and Washington, soon would have become too expensive to continue retaining under franchise-player deals.

From Prescott’s perspective, he was seeking the security of a long-term deal with a hefty signing bonus. But he and his representatives wanted the right long-term deal, not one that tied him down for too long. Prescott’s side reportedly had balked at a five-year contract, preferring a four-year deal.

That’s what Prescott got Monday. He receives a record $66 million signing bonus, and the deal includes approximately $126 million in guaranteed money, according to the person with knowledge of the contract terms. There are an additional $4 million in incentives that could push the maximum value of the deal to $164 million.

The $40 million average annual value of Prescott’s new deal does not match the $45 million average of the 10-year, $450 million contract extension quarterback Patrick Mahomes signed last summer with the Kansas City Chiefs. But Prescott’s deal includes no-trade and no-franchise-tag provisions, meaning Prescott will be eligible to be a free agent in the spring of 2025 at age 31.

Prescott’s contract contains additional years that will be voided. That enables the Cowboys, under cap accounting procedures, to lower Prescott’s impact against their salary cap. He is set to count $22.2 million against their 2021 salary cap, a savings of $15.5 million from the $37.7 million he would have counted against the cap under the franchise-player deal. The Cowboys technically might place the franchise tag on Prescott as a procedural move, but this deal will supersede that.

The deadline for teams to use the franchise tag on players is set to come Tuesday. But league officials were having discussions Monday about extending that deadline because the final salary cap figure for the 2021 season has not been determined. The Cowboys and Prescott’s representatives made that irrelevant in Prescott’s case with Monday’s agreement.