In one section of the book, Mr. Rahami wrote of âkilling the kuffar,â or unbelievers, the official said. Mr. Rahami also praised Anwar al-Awlaki, Al Qaedaâs leading propagandist, who died in a drone strike in Yemen, as well as the soldier in the Fort Hood shooting, one of the deadliest âlone wolfâ attacks inspired by Al Qaeda.
Five years after his death in a drone strike in Yemen ordered by President Obama, Mr. Awlaki remains a powerful influence on would-be jihadists, especially in the English-speaking West. Among his documented admirers were Syed Rizwan Farook, who along with his wife killed 14 people in San Bernardino, Calif.; Omar Mateen, who fatally shot 49 people in an Orlando nightclub; and Tamerlan and Dzhokhar Tsarnaev, who staged an attack at the finish line of the Boston Marathon with pressure-cooker bombs in 2013.
Thousands of Mr. Awlakiâs lectures and jihadist declarations are available on the web, as is Inspire magazine, which has published detailed instructions for making pipe bombs as well as more sophisticated explosive devices using pressure cookers and Christmas lights, the same components used in the New York-area bombs.
One key area of investigation is around the question of whether Mr. Rahami had help building the bombs or if anyone knew what he was doing and failed to report it. In all, he is linked to 10 explosive devices found in the region, including the two pressure-cooker bombs, one of which exploded in Chelsea on Saturday night, injuring 29 people.
No terrorist organization has claimed responsibility for the attack. While the Islamic State is usually quick to claim credit for attacks around the world, organizations linked to Al Qaeda vary widely in when or if they claim credit.
The authorities are scrutinizing a number of trips Mr. Rahami made overseas, particularly several to Pakistan. In May 2011, he made a three-month trip to Quetta, according to law enforcement officials, citing Customs and Border Protection records. Then, in April 2013, he made another trip to Quetta and did not return until March 2014, according to information provided to federal customs authorities by the New York City police.
Notably, Mr. Rahami underwent an additional interview at the airport with Customs and Border Protection officers on his returns from both of those trips, but customs officers did not flag any concerns in his travel records. Mr. Rahami was born in Afghanistan but he became a naturalized United States citizen when he was still a minor.
Two law enforcement officials said that Mr. Rahamiâs wife, Asia Bibi Rahami, was traveling overseas when the bombing occurred. In a statement the United Arab Emirates said Ms. Rahami had been in transit through the country and was detained for questioning.
A senior law enforcement official said on Tuesday that Ms. Rahami had made a statement to the F.B.I. and could be flown to the United States as soon as possible. The F.B.I. still believes that Mr. Rahami acted alone but is trying to speak with everyone who knew him.
Just before Mr. Rahami returned from his last trip to Pakistan in March, he emailed Representative Albio Sires, a New Jersey Democrat, asking for help getting a visa for his wife to come to America, according to Mr. Sires.
Ms. Rahamiâs Pakistani passport had expired, and agents at the United States Embassy in Islamabad discovered that she was 35 weeks pregnant, Mr. Sires said. Ms. Rahami was told that she would need to wait until her baby was born so she could apply for United States visas for both her and her child.
She eventually made it into the United States, though it was unclear when her visa issue was resolved. But in August 2014, Mr. Rahami got into a fight with his family, during which he stabbed his brother in the leg with a knife, according to court records.
The police arrived to investigate, and it was at this time that Mr. Rahamiâs father told them about his concerns about his sonâs possible involvement in terrorism. The information was passed to the Joint Terrorism Task Force led by the Federal Bureau of Investigation in Newark. Officers opened what is known as an assessment, the most basic of F.B.I. investigations, and interviewed the father.
An official, when asked about the inquiry, said the father made the comment out of anger at his son and later recanted it.
The assessment of Mr. Rahami is illustrative of the challenges the F.B.I. faces as it solicits information from the public about people who might pose a threat but then has to sort through what is credible and what is not.
The agency has been criticized as not having done enough in previous terrorism attacks, such as the 2013 Boston Marathon bombing; bureau officials say they must balance the need to protect the country while not overstepping its authority.
In the case of Mr. Rahami, the F.B.I. did not develop any further information that would have justified opening a more serious investigation, according to officials.
In Boston, one of the brothers, Tamerlan Tsarnaev, was also the subject of an assessment in 2011.
And in that case, the F.B.I. also did not generate any additional leads that would have prompted a more serious investigation.
The Tsarnaev assessment was one of approximately 1,000 the Joint Terrorism Task Force in Boston carried out that year.
In the Orlando nightclub attack this year, the circumstances were different. Omar Mateen, who carried out the deadly assault, had made highly inflammatory comments, which came to the attention of investigators. He told colleagues he had family ties to Al Qaeda and was a member of Hezbollah. During the 10-month investigation, Mr. Mateen was interviewed twice and the F.B.I. used confidential informers and recorded his calls. But the bureau found no evidence that his statements were credible or that he had ties to terrorism.
Mr. Rahami did face criminal charges of aggravated assault and illegal weapons possession stemming from the domestic dispute, according to court records. He spent over three months in jail, according to a law enforcement official with knowledge of the investigation. A grand jury, however, declined to indict Mr. Rahami.
Mr. Rahami remained in the hospital on Tuesday, recovering from surgery for gunshot wounds he sustained during the firefight with the police. Two officers were also injured in the gunfight.
A Linden police officer, Angel Padilla, who was wearing a bulletproof vest when he was shot in the abdomen, was released from the hospital Monday night, according to Capt. James Sarnicki of the Linden department.
Peter Hammer, a traffic investigator who was sitting in his patrol car when a bullet came through his windshield and grazed his head, was released Tuesday morning from University Hospital in Newark, Captain Sarnicki said.
Mr. Rahami is currently charged with attempted murder of a law enforcement officer, among other offenses.
Peter Liguori, the deputy public defender in Union County, N.J., said that his office had not received a call or application for a lawyer in Mr. Rahamiâs case.
âIf he applies, weâll help him,â Mr. Ligouri said. âWe would represent him if he needs our services.â
Mr. Rahami had a daughter with a high school girlfriend, Maria Mena, and on Tuesday, she filed court papers seeking full custody of the child, citing his possible involvement in âterrorist-related activity in NYC.â