Despite faltering TV ratings, an ongoing crisis over players’ National Anthem protests, and loud opposition from Dallas Cowboys owner Jerry Jones, NFL Commissioner Roger Goodell has signed a 5-year contract extension.

The league this afternoon confirmed the completion of contract talks, which began last spring before this season turned into a raging battle on numerous fronts. Having survived Deflategate and then handing the Lombardi Trophy to former friend turned harsh critic Robert Kraft after Kraft’s New England Patriots won the Super Bowl in February, Goodell has presided over a 2017 season teeming with PR issues and alarming TV ratings declines. President Donald Trump poured more salt in the wounds by tweeting his disapproval of players’ kneeling.

Nevertheless, the league’s compensation committee (a group of six owners, including Kraft) agreed to a deal guaranteeing Goodell $4 million in the first year and up to $200 million by 2024 if all financial targets are hit, according to the New York Times.

Jerry Jones, the owner of the Dallas Cowboys, has feuded publicly with Goodell over the commissioner’s suspension of star running back Ezekiel Elliott for six games due to domestic violence allegations. Elliott denies the allegations, but his legal appeals have failed to gain traction. In addition to his agitation about the Elliott case, Jones also criticized the system of allowing the committee, rather than all 32 owners, to determine the commissioner’s fate.

“Our Committee unanimously supports the contract,” a statement said, “and believes that it is fully consistent with “market” compensation and the financial and other parameters outlined to the owners at our May 2017 meeting, as well as in the best interests of ownership. We also have expressed in those conversations our strong and unanimous belief that we should proceed to sign the agreement now, consistent with the unanimous May resolution and to avoid further controversy surrounding this issue. We are pleased to report that there is a nearly unanimous consensus among the ownership in favor of signing the contract extension now.”