An ISIS affiliate in Bangladesh said Friday it was behind an attack on a Shiite mosque in the country's north that killed one man and wounded three others.

A statement posted on ISIS-affiliated Twitter accounts from Islamic State - Bangladesh said that the mosque was hit by a barrage of shots fired from machine guns.

At least five assailants fired on worshippers during evening prayers Thursday at the mosque in Haripur village in the Bogra district. A mosque official in his 70s who had been leading the prayers was killed.

Police on Friday detained two suspects for questioning, said local police official Arifur Rahman.

He said the men were picked up from the area of the attack. Details of their identities were not clear immediately.

The statement from the ISIS offshoot said "the soldiers of the caliphate targeted a place of worship for the apostates" built with funds from Iran. It vowed more such attacks.

Thursday's attack follows a wave of deadly assaults this year on foreigners, secular writers and the Shiite community in the Sunni-majority nation of 160 million.

The attacks have alarmed the international community and raised concerns that religious extremism is growing in the traditionally moderate South Asian nation.

Bangladesh's government has repeatedly denied the presence of the ISIS group in the impoverished nation.

Police have arrested six members of the banned local group Jumatul Mujahedeen Bangladesh, in connection with the Oct. 24 bombing of an annual rally of thousands of Shiite Muslims in Dhaka, according to senior Detective Branch official Munirul Islam. The bombs, lobbed into the crowd as people were gathering for an early morning procession through the capital, killed a teenage boy and wounded more than 100 people.

Authorities had quickly dismissed a claim of responsibility by ISIS in that attack too, saying it had no presence in the country, and that the culprits were likely from Jumatul Mujahedeen Bangladesh.

Security officials on Thursday killed the alleged mastermind of the Oct. 24 attack, Al Bani, during a gunfight in a Dhaka suburb, Islam said.

Islam described Bani as the military commander of the group, and said he and his accomplices opened fire on security forces as they were preparing to conduct a raid.

ISIS has also claimed responsibility for the killings of two foreigners -- an Italian aid worker and a Japanese agricultural worker -- but again the government said ISIS has no organizational presence in the country.

The government of Prime Minister Sheikh Hasina accuses domestic Islamist groups along with the main opposition Bangladesh Nationalist Party and its main Islamist ally, the Jamaat-e-Islami party, of carrying out the attacks to destabilize the country for political gains.