A Cairo appeals court has expelled diplomats and foreigners from a hearing on whether to extend the detention of a rights campaigner who had been advising the family of an Italian student found tortured to death.

Ahmed Abdullah, the head of the Egyptian Commission for Rights and Freedoms, was arrested at his suburban home on April 25 and stands accused of inciting revolt and terrorism.

Lawyers from his NGO had offered assistance to the lawyers of the family of doctoral student Giulio Regeni, who was abducted, tortured and killed in Cairo earlier this year.

The death poisoned Egypt's close relations with Italy, and Regeni's family has said it was distraught over Abdullah's arrest.

Abdullah entered the courtroom carrying a note that read "truth for Regeni."