Philadelphia Eagles defensive coordinator Jonathan Gannon, whose team lost Sunday’s Super Bowl, has agreed to terms to become the head coach of the NFL’s Arizona Cardinals, the team announced Tuesday.

Gannon has spent the past two years guiding the defenders for the Eagles, who squandered a 10-point halftime lead on the way to a 38-35 loss to Kansas City in the NFL title showdown at the Cardinals’ home stadium in Glendale, Arizona.

Gannon was interviewed by Arizona on Monday to replace Kliff Kingsbury, who was fired after Arizona finished a 4-13 campaign last month, and has agreed on a five-year contract, the Cardinals said.

Philadelphia’s offensive coordinator, Shane Steichen, was hired on Tuesday as the new head coach of the NFL’s Indianapolis Colts.

Gannon’s departure as well makes the Eagles the first Super Bowl team since San Francisco won the 1995 edition to then lose both coordinators to head coaching jobs.

The Eagles led the NFL with 70 quarterback regular-season sacks and surrendered the second-fewest yards of any NFL club last season.

Gannon, 40, has no prior NFL head coaching experience but has worked on the staffs of six NFL teams since 2007 — Atlanta, Tennessee, Minnesota, Indianapolis, Philadelphia and as a scout with the then-St. Louis Rams.

The Cardinals have missed the NFL playoffs in five of the past six seasons and have managed only one post-season victory since 2009.

Arizona general manager Monti Ossenfort is also a newcomer, replacing Steve Keim, who stepped down over health issues after this past season.

The Cardinals are also losing star defender J.J. Watt and receiver A.J. Green to retirement and star quarterback Kyler Murray is dealing with a torn knee ligament.