An Afghan asylum seeker has died at a West Australian detention centre from a suspected heart attack amid claims he had been denied medical treatment for two weeks.

Refugee advocates say that the Yongah Hill Detention Centre, north-east of Perth, is in lockdown and the riot squad has been mobilised after fellow detainees were told about the death of the Afghan man, believed to be Mohammad Nasim Najafi.

The detainee has reportedly tried to take his own life multiple times.

But a spokesperson for the Department of Immigration and Protection said there was no unrest at the centre. The spokesperson confirmed a male detainee had died, saying there was no indication of suicide or suspicious circumstances and an investigation was underway.

"The WA Police attended the centre and will now conduct an investigation as per normal practices," the spokeswoman said. "The department extends our deepest sympathy to the individual's family and friends."