Bangladeshi special forces leave the premises of a five-story building that was raided by police in Dhaka on July 26. Police said an apartment there was used as a den by suspected Islamist militants, nine of whom were killed. (AP)

A 24-year-old Bangladeshi American student was among nine suspected militants killed in a gun battle with police in Bangladesh, Dhaka police said Wednesday.

On Facebook, police identified seven of the nine suspects killed Tuesday after a raid in a residential neighborhood in Dhaka, including six Bangladeshis and American Shazad Rouf, 24, a master’s student in business administration at North South University in Dhaka.

Police said they descended upon an apartment in the neighborhood in the early hours and engaged in a protracted battle with the militants, who shouted “God is great” and hurled improvised bombs at the officers. Police said the apartment was loaded with small arms and draped in black Islamic State flags.

The men were plotting a major attack and were part of the same local group that carried out an assault on a cafe earlier this month that killed more than 20 people, police said.

Rouf was born in Bangladesh but spent time in Illinois and California as a youth, his father said in an interview. After Rouf had gone missing Feb. 3, his father had sought the help of police. His name was eventually listed among the 200 or so names of missing Bangladeshi citizens released this month by the country’s Rapid Action Battalion force.

[Foreigners restrict movements in Bangladesh after ISIS-claimed killings]

After the July 1 cafe attack, authorities launched a wide-ranging effort to locate Bangladesh citizens who had gone missing and whose families feared that they could be entangled in militancy. Five attackers in the cafe hostage-taking had gone missing in the preceding weeks and months. Rouf’s father said his son had not shown any signs that he had been radicalized in the weeks before he disappeared.

“That is the worst part. Maybe it was my inability to understand, but we never got any indication,” Tauheed Rouf said. The young man had been praying with some regularity, he said, but that was all.

[After attack, Bangladesh fears missing sons are being radicalized overseas]

The U.S. State Department referred all questions about Shazad Rouf to “local authorities” and declined further comment.

The Muslim-majority South Asian nation has been grappling with a rise in extremist violence since 2013. There have been brutal hacking deaths of secular bloggers, largely claimed by a local affiliate of al-Qaeda, and the killings of foreigners, Hindu and Christian priests, and other minorities that were claimed by the Islamic State militant group.

Rouf’s father said his son was born in Bangladesh and immigrated with the family to the Chicago suburb of Elmhurst in 1999.

Later, the whole family — except the father, who is an arms and military supply trader — became U.S. citizens and relocated to the San Francisco area. The family moved back to Bangladesh in 2009 so Rouf’s mother could be treated for cancer; she has since died. Rouf graduated from the American International School in Dhaka in 2010 and from North South University last year before embarking on his master’s program.

The elder Rouf said he had gone to identify the body earlier Wednesday and was not entirely sure it was his son, but police said they had made a positive identification through fingerprints in the national identity-card database.

Azad Majumder and Saad Hammadi in Dhaka and Carol Morello in Washington contributed to this report.

Read more:

Bangladesh is in the grip of Islamist mayhem. So it blames Israel.

The blog posts that can get you killed in Bangladesh

Killing of senior police officer’s wife marks a brutal turning point in Bangladesh

Today’s coverage from Post correspondents around the world