DHAKA, Bangladesh -- The man accused of carrying out a bomb attack in New York City's subway system was influenced by the sermons and writings of a radical Muslim preacher, but appeared to have no known links to local radical groups, Bangladeshi officials said Wednesday. The suspect has been identified as Akayed Ullah, a 27-year-old Bangladeshi immigrant.

Ullah had asked his wife in Bangladesh to read the writings and listen to the sermons of Moulana Jasimuddin Rahmani, the currently imprisoned leader of a banned group called Ansarullah Bangla Team, said Monirul Islam, a top official of the counterterrorism department.

The group has been linked to killings and attacks on secular academics and atheist bloggers in Bangladesh. Rahmani is serving time in prison for his involvement in the killings.

Get Breaking News Delivered to Your Inbox

The wife was questioned in Bangladesh and told investigators that her husband discussed Rahman's writings with her during his last visit home, Islam said.

Akayed Ullah New York City Taxi and Limousine Commission

Ullah is accused of strapping a crude pipe bomb to his body and detonating it during rush hour Monday.

Relatives and police said Ullah last visited his wife and newborn son in Bangladesh in September, after which he returned to the United States.

Counterterrorism officials questioned the wife and her parents before releasing her Tuesday night, Islam said, adding that investigators were currently questioning his brother-in-law and also planned to question any known close associates.

Ullah arrived in the United States in 2011 and the Department of Homeland Security said he is a lawful permanent resident of the U.S. who was living in Brooklyn. He came to the U.S. on a visa issued to him based on a family connection to a U.S. citizen.

U.S. law enforcement officials familiar with the investigation said Ullah had looked at Islamic State group propaganda online and told investigators in the United States he was retaliating against U.S. military aggression, but had no direct contact with the group.

Ullah's uncle, Abdul Ahad, said Tuesday that the suspect mostly remained inside a small apartment in Dhaka's Hazribagh area when he visited, leaving only to offer prayers at a nearby mosque.

Investigators said Ullah had no criminal record in Bangladesh.

Neither was he on law enforcement's radar in the United States. Police in New York City spoke with Ullah's family in Brooklyn's Flatlands section, CBS New York's Marcia Kramer reported. Ullah lived with his father, mother and brother in a residential area with a large Bangladeshi community, neighbors told the Associated Press.

His family was "deeply saddened" by the attack but also "outraged by the way we have been targeted by law enforcement," the family said in a statement sent by the New York Chapter of the Council on American-Islamic Relations. A teenage relative was pulled out of class and questioned in school without a parent, guardian or lawyer, the statement said.

Muslim-majority Bangladesh is governed by largely secular laws but the impoverished nation has struggled with a rise in radical Islam in recent years.

In July last year, five young men who reportedly belonged to the domestic militant group Jumatul Mujahedeen Bangladesh attacked a popular restaurant frequented by foreigners and wealthy Bangladeshis, leaving 20 hostages, including 17 foreigners, dead.

Journalists try to talk with the family members of 27-year-old Bangladeshi man Akayed Ullah, at a building where he used to live in Dhaka, Bangladesh, Tuesday, Dec. 12, 2017. Bangladesh counterterrorism officers are questioning the wife and other relatives of Ullah, who is accused of carrying out a bomb attack in New York City's subway system, officials said Tuesday. A.M. Ahad/AP

But even before that a spate of smaller attacks had targeted secular academics, atheist bloggers, foreigners and members of the country's tiny Hindu minority.

The Islamic State group claimed responsibility for most of the attacks, including the one at the restaurant, but the government of Prime Minister Sheikh Hasina denied that the Sunni extremist group has any presence in the impoverished country. The government has blamed the attacks on local radical groups.