Binghamton Police believe a teenager hid two explosives found in an apartment home last week.
Police charged 18-year-old Seth Hamby of Johnson City.
Two people doing renovation work on the upper floors of 3 Mill Street discovered what looked like pipe bombs.
The Endicott Bomb Squad removed and deactivated the devices.
Police say Hamby made them a year ago and intended to use them as fireworks.
He showed them to a friend who was living in the apartment.
When the friend told him to get rid of the devices, Hamby dropped them through a hole in the wall.
Because the pipes are considered explosives, Hamby will have to answer to a felony charge.