The suspect behind the New York and New Jersey bombings – Ahmad Khan Rahami – was charged with several crimes on Tuesday, including bombing a place of public use, use of weapons of mass destruction, according to a criminal complaint filed against him in a federal court. The complaint adds that he had planned the attacks for months and drawn inspiration from terrorists like 9/11-accused Osama bin Laden, The New York Times reported. The complaint says he bought the bomb-making equipment on eBay.

Authorities recovered a journal from the 28-year-old Afghan-American after he was arrested following a shootout with police. The diary contained writings on the war in Afghanistan and Iraq. One excerpt read, "You [government of the United States] continue your [unintelligible] slaught[er]" against the mujahideen, or holy warriors, be it in Afghanistan, Iraq, Sham [Syria], or Palestine," according to BBC.

"Inshallah [god willing], the sounds of the bombs will be heard in the streets. Gun shots to your police. Death to your OPPRESSION," the journal said. He also wrote that he wished to die a martyr and hoped to avoid arrest till he could go ahead with his plans, AP reported. "I pray to the beautiful, wise ALLAH to not take JIHAD away from me," he wrote.

Rahami was tracked down after police spotted him on surveillance footage from Manhattan's Chelsea area, where 29 people were injured in an explosion and a second detonating device was found close by. Another bomb exploded in New Jersey, but no one was hurt.

The Federal Bureau of Investigation first investigated Rahami in 2014 after his father had contacted the agency fearing that his son was involved in terrorism. The FBI's inquiry had not found any evidence that merited further investigation then, and the case was closed. The complaint, however, does not mention what led Rahami – a naturalised US citizen – to develop antagonistic feelings towards the country.