Detainees at Northam’s Yongah Hill Detention Centre have set fire to dozens of buildings during a riot overnight.

The chaos began around 8:45pm when tensions between guards and detainees boiled over.

One inmate witnessed the riot and said a small group caused the damage, with hundreds of others fleeing to safety.

“Detainees burnt 29 rooms of the compound, the compound has 54 rooms, now 29 of them of them are disabled. Now detainees are sleeping in the mess, which is where we eat the food. Just on the floor there with their mattresses, on the floor. Most of them are handcuffed as well,” he said.

He also said tension has been building for weeks.

“Five days ago, there was nearly a riot as well and three weeks ago, nearly a riot as well. He's been causing a lot of problems to the centre, I've put eight complaints, I have all the copies in my room - the papers. Eight complaints about this officer being really bad attitude and he push detainees to do something off, and he finally succeeded today.”

The department of Home Affairs has described it as a “major incident” and said one person had been taken to hospital.

9 News understands that is a 22-year-old Iraqi asylum seeker.

He is in a critical condition at Royal Perth Hospital.

9 News has been told he tried to commit suicide at the facility yesterday afternoon and his fellow detainees believed he did not receive sufficient medical attention before being taken to hospital.

Firefighters estimate the damage bill is around $500,000.