Ahmad Khan Rahami bought bomb making equipment on eBay, made a video of himself testing out homemade explosives, and kept a journal expressing outrage at the US "slaughter" of mujahideen in Afghanistan, Iraq, Syria and Palestine, federal prosecutors allege.
The charging documents and accompanying sworn statements from the FBI were unsealed in a Manhattan federal court and shed new light on Rahami's motives.
His journal apparently expressed the wish to die a martyr, the criminal complaint revealed.
One passage of his journal is said to have read: "Inshallah (God willing), the sounds of bombs will be heard in the streets. Gun shots to your police. Death to your oppression."
Other parts of the 28-year-old's journal allegedly praise "Brother" Osama bin Laden; Anwar al-Awlaki, an American-born Muslim cleric and leading al Qaeda propagandist who was killed in a U.S. drone strike in Yemen in 2011; and Nidal Hasan, the U.S. Army psychiatrist who shot dead 13 people and wounded 32 at Fort Hood, Texas, in 2009.
An eBay account linked to Rahami bought chemicals, circuit boards and ball bearings that matched the explosives and remnants collected at the crime scenes, the documents said.
Video found on a family member's mobile phone dated two days before the bombings showed Rahami lighting a fuse and igniting incendiary material packed in a partially buried cylinder.
Authorities are investigating whether Ahmad Rahami, who was not on US counter-terrorism lists, acted alone or as part of a terror cell.
Investigators studying CCTV footage may have identified the same man at each location, law enforcement sources reported to have said.
At least 29 people have been injured in an explosion which rocked Manhattan. Here's what we know so far.