Javed Faisal, spokesman for Afghanistan's chief executive Abdullah Abdullah, said today the authorities want to ensure universities do not become hotbeds of extremist activity.
The 27 students were arrested during a raid this week at Nangarhar University in the eastern city of Jalalabad.
The national intelligence agency says banners and other extremist paraphernalia were seized during the raid, which came after a student rally on the campus last week in support of the IS.