By Ruma Paul

DHAKA (Reuters) - A publisher of a slain online critic of religious militancy was hacked to death on Saturday in the Bangladesh capital, police said, hours after similar attacks on two secular writers and another publisher in the majority-Muslim country.

Faysal Arefin published books by Avijit Roy, a U.S. citizen of Bangladeshi origin who was killed by Islamists militants in the same way in February.

Arefin was hacked to death with sharp weapons in his office on the second floor of a crowded market in the capital, police said.

Militants have targeted secularist writers in Bangladesh in recent years, as the government has cracked down on Islamist groups seeking to turn the South Asian nation of 160 million people into a sharia-based state.

Four secular bloggers have been hacked to death this year for writing critically about Islamist militancy.

At least 15 members of an al Qaeda inspired group Ansarullah Bangla Team, including a British citizen, have been arrested since August, after blogger Niloy Chatterjee was killed by a group of attackers armed with machetes.

The country has also been rocked by attacks in which two foreigners were shot dead and a Shi'ite shrine in Dhaka was bombed.

In the earlier attacks on Saturday, two secular writers and another publisher of Roy were stabbed and shot in Dhaka.

Three unknown assailants entered the office of a publishing house and attacked them, police official Jamal Uddin said.

The attackers locked their victims inside the office before fleeing the scene, he added. They were rushed to a hospital and two of them were in a critical condition.

The publisher had filed a complaint with police after being threatened with death in a posting on Facebook following the attack on Roy, his friends said.

British high commissioner to Bangladesh Robert Gibson condemned Saturday’s attacks.

"Violence is never the answer or acceptable in any circumstances," he tweeted.

(Reporting by Ruma Paul; Editing by Alison Williams)