The San Francisco 49ers will keep a key assistant coach for the next two years.

According to an NFL source, secondary coach Ed Donatell has agreed to a two-year deal. His contract expired after the 2013 season. There was some thought in NFL circles that Donatell would leave for a defensive coordinator job.

However, thanks to the 49ers’ long playoff ride and a lack of open defensive coordinator jobs, Donatell stayed with the 49ers. If Donatell signed just a one-year extension, he could have been a candidate for defensive coordinator jobs next year. But the 49ers coveted him and clearly made it worth his while to stick around for the next two years.

He was a defensive coordinator from 2000-06 with Green Bay and Atlanta.