The Dallas Cowboys and Ezekiel Elliott have agreed on a $90 million, six-year contract extension that will make him the NFL’s highest-paid running back and end a holdout that lasted the entire preseason, a person with knowledge of the agreement said Wednesday.

The breakthrough was finalized the morning of the team’s first full workout before Sunday’s opener at home against the New York Giants. The person spoke to The Associated Press on condition of anonymity because the deal hasn’t been announced.

Elliott will get $50 million guaranteed. The $15 million-per-year average on the extension surpasses the $14.4 million Todd Gurley got from the Los Angeles Rams last summer. Gurley’s guarantee was $45 million.

The 41-day standoff between Dallas and the two-time NFL rushing champion came with the Cowboys holding high expectations coming off their first playoff win with Elliott and quarterback Dak Prescott. They’ve won two NFC East titles in three seasons together.

Although Prescott and receiver Amari Cooper are seeking long-term contracts in the final year of their rookie deals, getting an agreement with Elliott settles the most important issue as the Cowboys try to get past the divisional round for the first time since winning the last of the franchise’s five Super Bowls during the 1995 season.

Elliott held out with two years left on his rookie contract, at $3.9 million this season and $9.1 million in 2020. The fourth overall pick in the 2016 draft wanted to be the highest-paid back after getting those two rushing titles in only three years.

Even when he was suspended for six games over domestic violence allegations in 2017, Elliott still had the best per-game rushing average.

But the off-field issues were part of the backdrop as the stalemate dragged on, although owner and general manager Jerry Jones said more than once he didn’t consider Elliott’s issues a factor as it related to a new contract.

Jones jokingly said “Zeke who?” in response to a question from a reporter after a second straight solid preseason showing from rookie fourth-round pick Tony Pollard in Hawaii. A few days later, though, Jones sternly said he had earned the right to joke about Elliott after the 2016 All-Pro’s representatives took offense to the remark.

Over the next couple of weeks, Jones took an increasingly hardline stance publicly, finally calling out Elliott for not honoring his existing contract during his radio show last week.

But Elliott’s agent, Rocky Arceneaux, told reporters the sides were close to a deal after Elliott landed at Dallas-Fort Worth International Airport on Tuesday. Elliott spent almost the entire holdout in Cabo San Lucas, Mexico.

Elliott rose to stardom as a sophomore at Ohio State during the first College Football Playoff following the 2014 season, most notably at the home of the Cowboys when he rushed for 246 yards and four touchdowns in a blowout of Oregon in the championship game.

He wasted little time having an impact with the Cowboys, winning the rushing title as a rookie while Prescott earned NFL Offensive Rookie of the Year honors after Dallas won a franchise-record 11 straight games and was the top seed in the NFC. The Cowboys lost to Aaron Rodgers and Green Bay in the divisional round.

After the addition of Cooper in a midseason trade last year, Prescott and Elliott got a wild-card win over Seattle following their second division title last season. The Cowboys lost to the Los Angeles Rams, falling to 0-6 in the divisional round since beating Pittsburgh in the 1996 Super Bowl.

The Cowboys kept just two backs behind Elliott when they made their final cuts of the preseason: Pollard and Alfred Morris, a seven-year veteran who was Elliott’s primary replacement during the suspension two years ago. Morris rejoined the club in training camp. They later added Jordan Chunn.