DHAKA (Reuters) - Bangladeshi police arrested three men on Sunday as they investigate a knife attack on Zafar Iqbal, a popular author and professor of computer science and engineering.

Police said the arrests were in connection with background checks on suspected assailant Faizur Rahman. He was detained at the scene after the attack on Iqbal at a university in the city of Sylhet on Saturday.

Police said that Rahman, 25, identified as a student at an Islamic school, had said he attacked the writer as he was an enemy of Islam.

Rahman is receiving treatment in a hospital as he was attacked by students at the scene before the university authorities, with the help of police, took him into custody.

Iqbal, a respected writer and academic popular with children for his science fiction, was flown to a military hospital in Dhaka for treatment on Saturday night.

He is now out of danger and will recover in a few days, said Munshi Mujibur Rahman, a senior consultant at the hospital.

Prime Minster Sheikh Hasina described those responsible for the attack as fanatics who will face the full force of the law.

Police said that now they are trying to ascertain whether there is any link with any militant group to the attack.

Islamic militants in Bangladesh have increased attacks on a number of secularist, atheist writers, bloggers, publishers, foreigners, and religious minorities over the past five years.