EL PASO, Texas — A one-time West Texas FBI agent has been sentenced to two years in federal prison for selling guns illegally.

A federal judge sentenced John Thomas Shipley in El Paso on Tuesday after Shipley was convicted earlier this year of violating federal firearms laws. He was fired from his FBI job after his conviction.

Federal authorities say he acted as a gun dealer and illegally sold 51 weapons from 2005 to 2008. At least one of those guns was later traced by Mexican authorities to a deadly shootout across the border in the northern Mexican state of Chihuahua.