A Fairfax County man was charged Monday with making and possessing an explosive device after authorities determined that he had constructed a bomb that was found last year in a home for sale in the Franconia area.

According to a federal arrest affidavit, Atal Bashar, 38, of Fairfax County told a federal agent that he made the bomb for self-defense and left it in his dad’s home, where he sometimes stayed. Workers cleaning the home on Gildar Street so it could be sold found the device in March 2012, according to news reports and the affidavit.

Bashar told a magistrate judge in federal district court in Alexandria at his first appearance Monday that he could not afford a lawyer. The judge warned him that the charge — which carries a possible 10-year sentence — was “serious” and ordered him held, at least until a Wednesday hearing.

Bashar was born in Afghanistan and is a naturalized U.S. citizen, and he has previous convictions on drug and weapons offenses, according to the arrest affidavit. The affidavit, though, gives no indication that Bashar had broader plans for his homemade explosive, which utilized fireworks and was filled with wood screws, nails and other fasteners as shrapnel.

According to the affidavit, Bashar had once tried to sell fireworks to co-workers at LA Fitness, and he had been warned in May 2011 about setting off fireworks in the street. In an interview with a federal agent last week, he said he built the homemade bomb without doing any research or asking anyone for help, and it was meant for self -defense.