Defensive backs coach Cory Undlin is leaving the Eagles to become the Detroit Lions’ defensive coordinator.

This is a bit of a surprise. The Eagles’ secondary has long been a problem area, and the team ranked 19th in passing yards allowed during the 2019 season. But Detroit ranked last, so there’s that.

It has never been clear how much blame, if any, Undlin deserves for the problems of a defense that gave up 15 40-plus-yard completions this season, the NFL’s second-highest figure. He came here in 2015, from the Broncos, initially coaching under Chip Kelly, and was retained the next year when Doug Pederson succeeded Kelly. Undlin was among five Kelly assistants who stayed, and he was grateful, having just moved his wife and three children to Haddonfield.

Defensive coordinator Jim Schwartz’s scheme seems to put a lot of stress on the corners; Schwartz emphasizes pass-rush pressure over coverage. Undlin primarily coached corners but also was in charge of the backfield unit, including safeties coach Tim Hauck, who might be in position to assume Undlin’s job.

The Eagles have lost multiple corners to injury the past two seasons. The highest draft picks they’ve spent on the secondary in recent years are Sidney Jones and Rasul Douglas, drafted in the second and third rounds, respectively, in 2017. Neither Jones nor Douglas played a defensive snap in the playoff loss to Seattle. Was that Undlin’s fault, or does blame lie with the front office that drafted them?

Last month, safety and defensive backfield leader Malcolm Jenkins defended Undlin, when asked about the coach’s effectiveness. Jenkins said that Undlin is “somebody that understands the small techniques of the position that we play. I’ve had position coaches that only know how to teach the scheme. … They can only tell you very vague things.”

In Detroit, Undlin will work under Matt Patricia, with whom he served on Bill Belichick’s New England staff in 2004, when Patricia and Undlin were starting their NFL careers.

Schwartz interviewed last week for the Cleveland Browns’ head-coaching job, which since has gone to Vikings offensive coordinator Kevin Stefanski. Schwartz is expected to remain in his current role with the Eagles, who are looking to hire an offensive coordinator and a wide receivers coach, after dismissing Mike Groh and Carson Walch.