The Dallas Cowboys and star running back Ezekiel Elliott agreed to a new contract to make him the highest-paid player at his position and end his holdout -- just days before the start of the season.

The Cowboys announced the team agreed to a six-year, $90 million contract extension with Elliott with about half of the salary being guaranteed.

JERRY JONES: DALLAS PREPPING TO PLAY WITHOUT MISSING ELLIOTT

The deal will pay Elliott more money than Los Angeles Rams running back Todd Gurley, who signed a four-year, $57.5 million deal before the 2018 season.

Elliott’s monster contract ends the holdout, which cost the running back training camp with the team. Elliott spent the end of his offseason training in Mexico while hoping the franchise and his agent would come to terms on a new deal.

NFL FREE AGENT RYAN RUSSELL COMES OUT AS BISEXUAL, HOPES TO RETURN TO LEAGUE

Dallas owner Jerry Jones had been very public about his dealings with Elliott, even getting ready to use rookie Tony Pollard in case Elliott wasn’t ready to go for Week 1 against the New York Giants. But Elliott left Mexico on Tuesday and word broke about the big deal early Wednesday.

Elliott has been one of the most prolific running backs in the NFL since Dallas selected him with the No. 4 pick of the 2016 NFL Draft. In three seasons, Elliott has made two Pro Bowls and led the league in rushing twice.

CLICK HERE TO GET THE FOX NEWS APP

In 2018, Elliott rushed for 1,434 yards and six touchdowns. Dallas won the NFC East division but lost in the playoffs to the eventual NFC champion Rams.