Eric Mangini hired as 49ers' DC

Eric Mangini, who spent last season as San Francisco's tight ends coach, has been hired by the 49ers as their defensive coordinator, sources told ESPN NFL Insider Adam Schefter on Thursday.

Mangini received a three-year contract, according to sources, to join the staff of first-time head coach Jim Tomsula. Tomsula had served as the 49ers' defensive line coach for the past eight seasons; he was promoted after former 49ers coach Jim Harbaugh departed to become the coach at the University of Michigan.

Although Mangini worked with the offense last season and was a senior offensive consultant in 2013, his coaching roots lie on the defensive side of the ball. He was the New England Patriots' defensive backs coach from 2000 to 2004 before being promoted to defensive coordinator in 2005. He then served as the head coach for the New York Jets (2006 through 2008) and Cleveland Browns (2009-10). He worked for ESPN as an NFL analyst in 2011 and 2012.

Earlier this offseason, Mangini interviewed for the Washington Redskins' defensive coordinator gig that ended up going to Joe Barry. Mangini also interviewed for the Oakland Raiders' head coaching job that went to Jack Del Rio. Subsequently, Mangini reportedly talked to Del Rio about the possibility of becoming the Raiders' defensive coordinator.

Former Raiders interim head coach Tony Sparano has been hired by the 49ers to be the team's new tight ends coach, sources told Schefter on Thursday.

Mangini replaces Vic Fangio, who left the 49ers and was hired in the same capacity by the Chicago Bears.

Information from ESPN.com's Paul Gutierrez was used in this report.