DALLAS — “Zeke Watch” is finally over.

The Dallas Cowboys and Ezekiel Elliott agreed on a new contract, ending a holdout that lasted more than a month. He's expected to return to practice Wednesday morning.

Elliott agreed to a six-year $90 million extension with a guaranteed $50 million, WFAA confirmed via a source early Wednesday morning. The two-time leading rusher sought a contract that would make him the highest-paid running back in the NFL. 

It took some contentious negotiation in the final moments, however, to get the deal done.  According to a front office source, talks broke down last night around 10:30 without making any progress.  At that point, the front office source says the discussions were "not promising." That came as a surprise, given Elliott's agent told the world at DFW airport just hours prior that they were "very, very close" to a deal.

But a source close to Elliott confirms that things "got ugly" last night, and that Elliott was not happy with the way things were proceeding.

Fortunately for both sides, in the wee hours of Wednesday morning, the discussions resumed and continued until they had come to an agreement just before 6 o'clock. And now Elliott is the highest-paid running back in NFL history, eclipsing Los Angeles Rams runner Todd Gurley in every metric -- years, total money, guaranteed money, and average annual value.

Elliott's agents and the Cowboys organization have been locked in negotiation for more than a month, as Elliott held out of Training Camp in Oxnard, Calif. in July. 

There was no shortage of intrigue over the past few weeks leading up to the deal. 

After spending time training in Cabo, Elliott returned to Dallas, only to leave for Cabo once more after a couple of days in North Texas.

RELATED: Zeke watch: Dallas Cowboys standout running back returns from Cabo

When discussing the success of backup rookie running back Tony Pollard after the team’s second preseason game, Cowboys owner Jerry Jones quipped “Zeke who?” which drew the ire of Elliott and his agent. Jones later doubled down on his right to joke with Zeke. 

Reports began circulating that the Cowboys were prepared to make Elliott the second-highest-paid back in the league.

It is hard to deny the importance of Elliott to the Cowboys. They win 70% of the games he plays in, while the number drops to 50% without him. Cowboys executive vice president Stephen Jones is on record saying Elliott is “the straw that stirs the drink.”

Cowboys running back returned to DFW from Cabo Tuesday, as the team, and their all-Pro running back got closer to a deal. Elliott makes a return days before Game 1 against the New York Giants.

RELATED: Cowboys make a new offer to running back Ezekiel Elliott but there's no deal yet

Before this new deal was agreed to, Elliott was playing in the second-to-last-year of the rookie deal he signed after he was picked fourth overall out of Ohio State in 2016.

More Dallas Cowboys-related coverage: