Darius Slay got what he was waiting for — a trade out of Detroit and a big new contract.

The Lions agreed to trade Slay to the Philadelphia Eagles, ending the standout cornerback's seven-year stint in Detroit. Agent Drew Rosenhaus confirmed the trade Thursday and that Slay agreed to a three-year, $50 million extension with Philadelphia.

CLICK HERE FOR MORE SPORTS COVERAGE ON FOXNEWS.COM

The Lions drafted Slay 36th overall in 2013, and he earned All-Pro honors in 2017. Slay wanted a new contract before last season and did not attend Detroit's mandatory minicamp. He ended up reporting to training camp and played well enough to earn a third Pro Bowl nod.

Still, if there were any doubts about Slay's wishes for the future, they seemed to be dispelled Wednesday night after ESPN reported that Detroit had reached an agreement with cornerback Desmond Trufant. Slay tweeted that he wanted out.

“Congrats to my guy!!!! Hope that speeds up my trade process!!” the tweet said.

On Thursday, Slay tweeted his thanks to Detroit and the fans there:

“Detroit! Ya’ll have been so good to me & my family. I’m going to miss all the fans & showing the city love. I appreciate the fans, coaches, staff & City. Nothing but love & respect to y’all. To my Eagles fans, ya boii is READY TO WORK!”

Slay has 19 interceptions in his NFL career, including two last season.

ESPN, citing an unidentified source, reported that the Lions will receive 2020 draft picks in the third and fifth rounds for Slay.

The Eagles needed help in the secondary. Cornerback Ronald Darby is not expected to return, and the team is not bringing back safety Malcolm Jenkins. Philadelphia had the cap space and draft picks available to pull off a move like this.

Eagles defensive coordinator Jim Schwartz was Detroit's coach when Slay was a rookie in 2013.

The Lions are overhauling a defense that ranked 31st in the league last season. Detroit agreed to a two-year deal with defensive tackle Danny Shelton and a trade bringing safety Duron Harmon to the Lions from New England.

Detroit has also reportedly agreed to deals with Trufant, linebacker Jamie Collins and defensive tackle Nick Williams. An NFL Network reporter, citing an unidentified source, reported Thursday that the Lions had a one-year agreement with safety Jayron Kearse.

The Lions released defensive tackle Damon Harrison and linebacker Devon Kennard.

This could be a make-or-break year for Detroit coach Matt Patricia, who is 9-22-1 after two seasons at the helm. The defensive struggles have been particularly jarring, since Patricia was a defensive coordinator with New England before taking over the Lions.