Zandile Mafe was in court for the case which officials have described as an attack on the country's democracy.

The 49-year-old had already been charged with arson in connection with the fire, which started on January 2.

But the prosecution said an additional charge of terrorism was added because he was also caught with an explosive device.

Dozens demonstrated outside the court saying Mafe was innocent.

[Protester, name not provided, saying:] "We are protesting because we think Mr Mafe is being a scapegoat, he's the fall man. It was the wrong man."

The blaze caused the roof of the newer part of the Cape Town building to collapse.

The Old Wing, dating back to 1884, was also damaged though some sections containing important heritage - such as a museum with artworks - were saved.

The case was adjourned until February 11 and Mafe ordered to be detained in a psychiatric institute.

That's after pleas from his defense counsel that Mafe suffers from mental illness.