Saif al-Islam, a son of deposed Libyan leader Muammar Gaddafi, appeared in court on Thursday in the town of Zintan, where a militia has held him since his capture in November 2011, a local council official said.
Saif al-Islam smiled and told journalists he was in good health during his brief court appearance.
Once Gaddafi's presumed heir, Saif al-Islam is wanted by the International Criminal Court (ICC) on war crimes charges, but the current case relates to charges that he gave information to an ICC lawyer last year that could endanger national security.
He was the only defendant of 13 people who were called to appear in court on those charges, confirming he was in the room when his name was called out and that his lawyers were present.
The case was then postponed until September 19 because the defence's case was incomplete.
The ICC lawyer, Australian Melinda Taylor, was herself detained for three weeks after a meeting in which Saif al-Islam is accused of handing over sensitive papers and information.
Taylor has said her detention proved Saif al-Islam could not get a fair trial in Libya and should be tried in The Hague.
Libya, which wants to try Saif al-Islam itself, has yet to indict him for war crimes, although the public prosecutor has said a case is being prepared and will soon go to court.