Consecutive blown fourth-quarter leads have cost Philadelphia Eagles defensive coordinator Juan Castillo his job, as he was fired Tuesday and replaced by secondary coach Todd Bowles.

Head coach Andy Reid made his longtime assistant and friend Castillo the Eagles defensive coordinator on Feb. 2, 2011 after 13 seasons coaching the offensive line. Castillo was with the Eagles for 18 years, longer than any coach in franchise history.

"I want to make it clear that I have nothing but the ultimate respect for Juan Castillo as a coach and as a person," Reid said in a statement released by the team. "He's one of the finest football coaches that I have ever worked with. He has served this organization extremely well for 18 years and letting him go was a difficult decision. I know he will continue to be a successful coach in this league and wish he and his family nothing but the best.”

The 3-3 Eagles are on a bye this week. They wasted a 10-point lead with 5:18 remaining and lost 26-23 in overtime to Detroit this past weekend after allowing Pittsburgh to rally for a winning field goal as time expired the week prior.

In Castillo's first season as a defensive coordinator, the Eagles ranked eighth in total defense, allowing an average of 324.9 yards per game. Through six games this season, the Eagles are 12th in total defense, allowing 330.8 yards per game, but have just eight takeaways and their seven quarterback sacks rank 30th in the NFL.