NEW YORK (AP) -- He bought bomb ingredients on eBay and recorded a mirthful video of himself igniting a blast in a backyard. In a handwritten journal, he warned that bombs would resound in the streets and prayed he'd be martyred rather than caught, authorities say.
Ahmad Khan Rahami's jihad journal ended with a stark message, according to court papers:
"Death to your oppression."
Federal court complaints filed Tuesday gave a chilling glimpse into what authorities say motivated the Afghan-born U.S. citizen to set off explosives last weekend in New York City and New Jersey, including a bomb that injured 31 people in Manhattan. The blasts came two years after the FBI looked into him but came up with nothing tying him to terrorism.
Rahami remains hospitalized with gunshot wounds from a shootout with police that led to his capture Monday outside a bar in Linden, New Jersey. It wasn't immediately clear whether he had a lawyer who could comment on the charges against him, which include federal terror crimes and state charges of attempting to murder police officers.
Rahami ordered citric acid, ball bearings and electronic igniters on eBay and had them delivered to a Perth Amboy, New Jersey, business where he worked until Sept. 12, the court complaints said. San Jose, California-based eBay Inc. noted that the products are legal and widely available and said the company had worked with law enforcement on the investigation.
Just two days before Saturday's bombings, a relative's cell phone recorded Rahami igniting incendiary material in a cylinder buried in a backyard, the fuse being lighted, a loud noise and flames, "followed by billowing smoke and laughter," the complaints said.
And the complaints said in his bloodied journal - damaged by shots from his gun battle with police - he fumed that the U.S. government was slaughtering Muslim holy warriors and alluded to plans for revenge.
One portion expressed concern at the prospect of being caught before being able to carry out a suicide attack and the desire to be a martyr. Another section included a reference to "pipe bombs" and a "pressure cooker bomb" and declared: "In the streets they plan to run a mile," an apparent reference to one of the blast sites, a charity run in Seaside Park, New Jersey.
"The sounds of bombs will be heard in the streets," the journal declared.
There also were laudatory references to Osama bin Laden, Anwar al-Awlaki - the American-born Muslim cleric who was killed in a 2011 drone strike and whose preaching has inspired other acts of violence - and Nidal Hasan, the former Army officer who went on a deadly shooting rampage in 2009 at Fort Hood, Texas, the complaints said.
The FBI has said Rahami apparently was not on its radar at the time of the bombing. But he was in 2014, when the FBI opened up an "assessment" - its least intrusive form of inquiry - based on comments from his father after a domestic dispute, the bureau said in a statement.
"The FBI conducted internal database reviews, interagency checks and multiple interviews, none of which revealed ties to terrorism," the bureau said.
A law enforcement official said the FBI spoke with Rahami's father in 2014 after agents learned of his concerns that the son could be a terrorist. During the inquiry, the father backed away from talk of terrorism and told investigators that he simply meant his son was hanging out with the wrong crowd, according to the official, who was not authorized to discuss the investigation and spoke to The Associated Press on condition of anonymity.
Rahami's father, Mohammad, told reporters Tuesday he called the FBI at the time because Rahami "was doing real bad," having stabbed his brother and hit his mother. Rahami was not prosecuted in the stabbing; a grand jury declined to indict him.
"But they checked, almost two months, and they say, 'He's OK, he's clear, he's not terrorist.' Now they say he's a terrorist," the father said outside the family's fried-chicken restaurant in Elizabeth, New Jersey. Asked whether he thought his son was a terrorist, he said: "No. And the FBI, they know that."
The FBI has faced questions before about whether it could have done more ahead of time to determine whether attackers had terrorist aspirations. The issue arose after the Orlando massacre in June, for instance, when FBI Director James Comey said agents a few years earlier had looked into the gunman, Omar Mateen, but did not find enough information to pursue charges or keep him under investigation.
White House spokesman Josh Earnest said President Barack Obama was confident the bureau would review Rahami's interactions with law enforcement "to determine if there's something different that could have been done or should have been done to prevent the violence."
Meanwhile, investigators are looking into Rahami's overseas travel, including a visit to Pakistan a few years ago, and want to know whether he received any money or training from extremist organizations.
Rahami's wife is thought to be a Pakistani national. On a trip to Pakistan in 2014, Rahami emailed his local congressman seeking help because his pregnant wife had an expired passport.
David Duerden, a spokesman for the U.S. Embassy in Abu Dhabi, was unable to confirm or deny reports that Rahami's wife had been questioned in the United Arab Emirates, which is home to a large expatriate Pakistani population and has airports that offer daily flights to Pakistan.
"We're aware of the reports but don't have any comment at this time," he told the AP.
Emirati officials in Dubai and the federal capital Abu Dhabi said they had no information on her.
Federal agents would like to question Rahami. But Rep. Tom MacArthur, R-N.J., who received a classified briefing from the FBI, said Rahami was not cooperating; that could also be a reflection of his injuries.
Rahami, who came to the U.S. as a child, studied criminal justice for a time at a community college, and he worked as an unarmed night guard for two months in 2011 at an AP administrative technology office in Cranbury, New Jersey. At the time, he was employed by Summit Security, a private contractor.
AP global security chief Danny Spriggs said he learned this week that Rahami worked there and often engaged colleagues in long political discussions, expressing sympathy for the Taliban and disdain for U.S. military action in Afghanistan. Rahami left that job in 2011 because he wanted to take a trip to Afghanistan, Spriggs said.
AP spokesman Paul Colford said the news cooperative told law enforcement officials about Rahami's work at the Cranbury facility.
Summit's vice president of security services, Daniel Sepulveda, said Rahami last worked for the company in 2011. Sepulveda said he was unaware of any complaints about Rahami's conduct.
Tucker reported from Washington. Associated Press writers Jake Pearson in New York; Michael Balsamo, Michael Catalini and Dake Kang in Elizabeth, New Jersey; Josh Cornfield in Pennsylvania; Adam Schreck in Dubai; and Alicia A. Caldwell, Kevin Freking and Deb Riechmann in Washington contributed to this report.