Firefighters in Cape Town have finally brought a wildfire under control after it swept across the slopes of the city’s famed Table Mountain, burning the university’s historic library and forcing the evacuation of some neighbourhoods.

The smouldering fire is being watched for flare-ups amid high winds and hot, dry conditions.

City authorities said the fire, which started early on Sunday, was “largely contained” more than 24 hours later.

The blaze had already badly damaged the library and other buildings on the campus of the University of Cape Town on Sunday, as well as other historic buildings nearby.

South Africa Cape Town Fire
The remains of the library at the University of Cape Town (AP)

Fuelled by the high winds, it spread through the wild bush on the mountain slopes towards the city’s centre and surrounding residential areas.

Devil’s Peak, one of the famous points of the mountain which overlooks Cape Town, was lit by flames as the fire raged through the night. Residents of suburbs on the mountain slopes were evacuated early on Monday as the blaze came dangerously close to their homes.

Firefighting helicopters with water containers suspended on ropes had been scooping up water from swimming pools and the nearby ocean and dumping it on the fire, but they were grounded on Monday because of the strong winds.

Four firefighters were injured battling the blaze on the slopes, said officials. The South African army had offered to help with some of its aircraft.

“It’s a massive wind that’s blowing, and that is actually fuelling the fire to spread in each and every direction,” Cape Town mayor Dan Plato said.

South Africa Cape Town Fire
Clouds of smoke above Cape Town (Nardus Engelbrecht/AP)

A man in his 30s was arrested on suspicion of arson for setting additional fires, another city official said, but it is not clear if he was responsible for starting the blaze.

The man was arrested after witnesses reported seeing three people moving through flames setting more fires, Cape Town safety and security official JP Smith said.

Wildfires on the mountains surrounding Cape Town are fairly common during the hot, dry summer months and are sometimes whipped up into huge, uncontrollable blazes by strong coastal winds.

The temperature in Cape Town peaked at 35C on Sunday and the winds hit the city overnight and on Monday.

About 250 city and volunteer firefighters were deployed to battle the fire, which damaged four buildings at the University of Cape Town.

The Jagger Library’s main reading room, where rare and unique African books and manuscripts were kept, was gutted and some of the “priceless” works had been lost, the university said.

Others were saved after fireproof doors activated and sealed off parts of the library.

A windmill built in 1796 and a restaurant near a memorial for British colonial politician Cecil Rhodes also burned down.

The university has been completely evacuated and shut down and meals were being provided for around 4,000 students who had to quickly leave the campus and their residences, according to Gift of the Givers, a disaster response organisation.