The Immigration Department says riot police have regained control of the Villawood detention centre in Sydney after a night of violent protests by detainees.

Firefighters were pelted with roof tiles and timber as at least six buildings were set on fire. A computer lab, kitchen and medical facilities were all destroyed.

It is estimated around 100 detainees took part in a protest which turned violent when fire extinguishers were used on security guards.

A gas cylinder exploded at the height of the unrest, shaking buildings at the centre.

This morning, Immigration Department spokesman Sandi Logan said firefighters were still trying to extinguish the blazes but said New South Wales Police had regained control.

Mr Logan said it had been a "tough night" and said he did not know what had sparked the protests.

He described the attacks on firefighters as "appalling" and said the full extent of the damage would not be known until later this morning.

Mr Logan warned criminal charges could be laid over the incident and confirmed the centre's unarmed guards had been forced to retreat when the riot broke out.

"We are in the process of confirming that all the detainees in the centre are safe," he said.

He said that "miraculously" no injuries had been reported.

Earlier as many as 13 detainees had been on the roof of a residential block and this morning three of them were continuing their rooftop protest.

The Refugee Action Coalition says the earlier group of rooftop protesters comprised three Kurds, two Iranians, and eight Afghans.

It says two men mounted the roof about 8:00am yesterday after a clash between detainees and guards. The remainder climbed onto the roof last night, and mattresses and furniture were set alight shortly after.

It is understood the rooftop protesters have been in detention for between 13 and 19 months.

Jamal Daoud from the Social Justice Network says the protesters were demanding to speak with an Immigration official about the time it is taking to process their applications.

"This is by reason of the Department of Immigration, the treatment of these people, ignoring their cases, ignoring that they have been in detention for a long time," he said.

"They don't know anything about the process and about how all this will happen."

One rooftop protester told the ABC his demands were plain: "What do we want? Freedom - just freedom."