Joshua Prater, 19, was previously charged with misconduct involving weapons after a cleaning woman in May 2013 found what appeared to be a bomb in Prater's Tempe home. A Tempe Police bomb unit later confirmed the item was a legitimate explosive device, according to court records.

Prater, who was facing a felony charge, pleaded guilty to one misdemeanor count of disorderly conduct in a brief hearing in downtown Phoenix Wednesday morning.

When Tempe Police searched Prater's home last May, investigators found other devices and explosive materials in Prater's bedroom.

Prater, who was 18 at the time, told authorities he had made one device about eight years before May 2013 but said he didn't know it was filled with gunpowder, according to Maricopa County Superior Court documents.

Prater's lawyer, Adam Feldman, said the object was being used for a school project and likened it to a homemade firework.

The only reason for the original felony charge was because the object was found soon after the Boston Marathon bombing, Feldman said.

Prater was placed on unsupervised probation and has a sentencing trial set for June 5.