Bangladesh security officials say they have arrested a leading suspect in the hacking death of an American blogger who wrote against religious extremism.

The elite anti-crime Rapid Action Battalion force says the suspect, Farabi Shafiur Rahman, was arrested Monday, four days after at least two attackers killed Avijit Roy with meat cleavers on a crowded sidewalk in Dhaka.

It says Rahman had threatened to kill Roy in posts on Facebook. Rahman, who has strongly denounced atheism, was arrested previously for threatening an imam who performed funeral prayers for an atheist blogger who was killed in 2013.

Roy, a Bangladesh-born U.S. citizen, was a prominent voice against religious intolerance. His wife was also injured in the attack.