A Jersey City man was charged with carrying homemade explosives into an NJTransit train on April 7, more than a week before the infamous Boston Marathon bombings.

Mykyta Panasenko, 27, stands accused of having "two destructive devices, specifically improvised explosive devices constructed from a cylinder containing Pyrodex (black powder)” on April 5, an official complaint says, as reported by the Jersey Journal.

Panasenko was arrested on April 15 and charged with possession of destructive devices and creating a risk of widespread damage, The New York Daily News reports. However, Panasenko denies that he intended to do any harm with the explosives, telling the Daily News that he detonated them April 7 in an unpopulated area “for fun.”

According to authorities, Panasenko brought the explosives aboard an NJTransit train from Hoboken to Suffern, N.Y., the Jersey Journal reports.

The Jersey City resident appeared in court Wednesday to hear the police’s formal charges against him. Afterward, Panasenko was released on his own recognizance, The Daily News reports.

“There is no indication at this point of the investigation that he intended to detonate a device in his building or on the transit system,” Jersey City cops said in a press release. “Police recovered components of an explosive device at his home, not a completed device. However, the investigation revealed that he did transport completed devices from his home at some point."

In an interview with The Daily News, Panasenko stated that authorities became aware of the devices after his roommate “freaked out” and told one of the defendant’s co-workers.

Panasenko was then interrogated by FBI agents on April 8, where he claimed that he was unaware that the explosives were illegal.

“They were fireworks,” he told The Daily News. “Obviously, it was a bad idea.”

Given the nature of the recent Boston Marathon attacks, Panasenko’s arrest was publicized alongside phrases such as “terrorist” and “bombings.” The 27-year-old expressed discomfort that his name was being discussed in such a manner.

“I’m not feeling well,” he said. “After all the stuff I just read about myself online, I almost passed out.”

The Port Authority Police Department and FBI Joint Terrorism Task Force have also reviewed Panasenko’s case, The Jersey Journal reports. The matter remains under investigation, Hudson County Prosecutor’s Office spokesman Gene Rubino said Thursday.

If convicted, Panasenko faces up to five years in prison.