Bangladesh's elite security force said they had arrested an Islamist on Monday over last week's murder of the atheist American blogger Avijit Roy, accusing him of being behind earlier death threats on social media.
"He is the main suspect" in the killing of Roy, said a spokesman for the Rapid Action Battalion (RAB) after Farabi Shafiur Rahman was arrested in the capital Dhaka.
"He is a fundamentalist blogger," RAB spokesman Major Maksudul Alam told AFP, adding that according to "primary information", Farabi had threatened Roy through Twitter and Facebook.
"(Roy's) family told us that he got threats from Farabi several times," he added.
A source in the RAB said the elite force, mainly tasked with tackling religious militancy in the Muslim-majority nation, has seen correspondence between Farabi and another person about killing Roy.
The American was hacked to death with a machete in downtown Dhaka last Thursday.
He has been known for his Facebook postings against atheist writers and Islamophobes.
Roy, who was the founder of the Mukto-Mona (Free-mind) blog, was born in Bangladesh but moved to Atlanta in the southern US state of Georgia around 15 years ago.
He and his wife, who was also badly injured in the attack, had been returning from a book fair when they were both hauled off their rickshaw by two assailants who then slashed them with the machetes.
Roy is the second Bangladeshi atheist blogger to have been murdered in two years and the fourth writer to have been attacked since 2004.