Bangladeshi security officials arrested a person of interest Monday in the killing of an American writer who was hacked to death last week as he walked with his wife in Dhaka, a government spokesman said.

The arrest of Farabi Shafiur Rahman came four days after attackers wielding meat cleavers killed Avijit Roy on a crowded sidewalk in the capital, said Mufti Mahmud Khan, a spokesman for the anti-crime Rapid Action Battalion. Roy, an engineer, was an outspoken atheist and critic of the intertwining of religion and politics.

A U.S. citizen who was born in Bangladesh, Roy was killed on a visit from Georgia in the United States to attend Dhaka's main book fair. He and his wife, Rafida Ahmed, were attacked after leaving the fair. Ahmed was seriously injured.

Rahman, a blogger who denounced atheism, had threatened Roy in Facebook postings, Khan said, quoting him as writing: "Avijit Roy lives in America, so it's not possible to kill him right now. But he will be killed when he comes back."

Rahman had been arrested previously for threatening an imam who performed funeral prayers for another atheist Bangladeshi blogger who killed in 2013. He was released on bail after six months in jail.

While Rahman acknowledged making the threats, Khan said, authorities refused to say if they believed he was one of the attackers.

"He has admitted that he threatened Avijit but we are not sharing more information with you for the sake of the investigation. We need to ask him more," Khan said.

The government of Bangladesh has accepted a U.S. offer of FBI help in the investigation of the killing, according to Foreign Minister A.H. Mahmood Ali.

Associated Press