Twelve awaiting trial prisoners are being treated for smoke inhalation after a fire at the Pretoria Magistrate?s Court.

The blaze broke out in the holding cells earlier.

Apart from the 12 prisoners several firefighters also had to be treated for smoke inhalation.

The dozen men were trapped inside the holding cells of the courthouse for close to two hours.

They were only rescued after emergency service officials cut open the bars of the cells.

It is understood the keys could not be found and when they were finally located, they did not work.

Rescue workers are still going through the building to ensure no one else has been trapped.

The fire started shortly before noon in a storeroom next to where prisoners are held.