The Mthatha Magistrate's Court was evacuated on Monday afternoon after a portion of the building caught fire.
Police spokesperson Lieutenant-Colonel Mzukisi Fatyela said one of the offices at the court had been found burning during the lunch hour.
He said the office was where cases are captured and dockets are kept.
Fatyela said the flames were eventually put out by firefighters, and that no one had been injured.
"The blaze was during lunch time and everybody was out on lunch. All the prisoners were taken to a safe place," he said.
Fatyela said court officials had managed to remove most of the case dockets that were kept in the affected office.
He said police were investigating the possibility of arson, and that an inquiry docket had been opened at Madeira Police Station.