South Africa's Table Mountain smouldered on Tuesday after a fire swept the iconic site, destroying a library housing rare collections and forcing thousands to evacuate, but officials said the blaze was under control.

At least 600 hectares of land were charred
At least 600 hectares of land were charred AFP / RODGER BOSCH

Smoke rose from the mountain after firefighters battled to contain the flames with the help of helicopters dumping water on the blaze, which first broke out Sunday.

"The fire is very much under control," City of Cape Town safety chief JP Smith said.

The fire broke out in the foothills of Table Mountain
The fire broke out in the foothills of Table Mountain AFP / RODGER BOSCH

"There were two very small flare-ups this afternoon," he added, but said they were quickly extinguished.

Cape Town fire guts university library
Cape Town fire guts university library City of Cape Town / ESN

Rey Thakhuli, a spokesman for South Africa National Parks, said that "mopping up operations (are) now under way... with crews now attending to shoulders".

Strong winds whipped up flames after the fire first broke out on the foothills of the mountain, burning 600 hectares (1,500 acres) of land and forcing some 4,000 students to leave their homes for nearby hotels.

Helicopters dumped water on the flames
Helicopters dumped water on the flames AFP / RODGER BOSCH

The library at the University of Cape Town that housed a unique collection of African archives and an 18th century Mostert's Hill windmill was also gutted.

Cape Town fire guts university library
Cape Town fire guts university library City of Cape Town / ESN

"We are... devastated by the loss of the special collections in the library," the university's Vice Chancellor Mamokgethi Phakeng said in a statement on Tuesday.

"It pains us to look at it," she said, saying the destroyed items "cannot be replaced".

Around 3,500 African film collections and some government publication collections were ruined in the inferno, Phakeng said.

Rubble covered the ground of the African library, with broken tiles scattered on the floor of the now roof-less building, photos showed.

"It is not only the historic buildings themselves that have been lost, but their contents and collections," the Cape Town Heritage trust said in a statement.

Cape Town city officials said residents from nearby areas were evacuated as a precautionary measure.

No casualties have been reported so far apart from four firefighters who have been injured.