FILE PHOTO: Policemen patrol outside the Holey Artisan Bakery and the O'Kitchen Restaurant as others inspect the site after gunmen attacked, in Dhaka, Bangladesh, July 3, 2016. REUTERS/Adnan Abidi/File photo - RTX2N8EB

DHAKA (Reuters) - Bangladesh police said on Saturday they had arrested one of the men behind a militant attack on a Dhaka cafe last year that killed 22 people, mostly foreigners.

Jahangir Alam was detained late on Friday during a raid in Tangail, about 100 km (60 miles) northwest of the capital, the head of the counter-terrorism police, Monirul Islam, told reporters.

“He was one of the masterminds,” Islam said.

Islamic State has claimed responsibility for the July 1 assault, when gunmen charged into the cafe in the diplomatic quarter. Nine Italians, seven Japanese, an American and an Indian were among the dead.

Bangladeshi authorities say they suspect the involvement of Jamaat-ul-Mujahideen Bangladesh (JMB), an outlawed domestic group that has pledged allegiance to Islamic State.

Islam said the arrested man had been a commander for the group in the north of the country.

Police have killed about 50 suspected militants in shootouts since the attack, including the man they say was its main planner, Bangladesh-born Canadian citizen Tamim Ahmed Chowdhury.