A 19-year-old first-time male prisoner has been raped by two male inmates at maximum security Hakea Prison in Perth.

The ABC understands the victim was on remand and it was the first time he had been to prison. The ABC has been told he had only been in Hakea for about two weeks when the incident occurred.

The Department of Corrective Services today confirmed it had referred the matter to police for investigation. The ABC understands the victim is still in Hakea but has been moved into a special protection unit.

After the incident, staff from WA's emergency rape crisis centre, known as SARC (Sexual Assault Resource Centre), went into the prison to respond.

Corrective Services Minister Joe Francis said sexual assault was unacceptable and the "very serious matter" had been referred to WA Police.

Opposition corrective services spokesman Paul Papalia said he was horrified by the case.

"This is a shocking incident and it's confirmation that our prisons are massively overcrowded under the Barnett Government," he said.

"Overcrowded prisons are dangerous for prison officers and other staff, they are compromised and less likely to change the behaviour of prisoners and they are very dangerous for vulnerable prisoners who may not be serious offenders at all."

In a statement the Department of Corrective Services said the incident at Hakea, as with any report of sexual assault at one of its facilities, would be treated seriously and sensitively.

"The prisoner concerned was seen by prison medical staff and provided with counselling and support," it said.

"This type of incident is rare within the prison system.

"There is no direct relationship between prisoner numbers and incidents of physical assault."

The statement said the security and safety of all prisoners was a priority and the department employed a range of procedures to mitigate violence.

Opposition claims prison over capacity

According to the latest figures available on the department's website, there were 984 prisoners in Hakea as at the end of June, almost 90 inmates more than its operational capacity.

Hakea is located in Canning Vale and handles maximum, medium and minimum security prisoners, mostly ones who are on remand because they are waiting to appear in court or have just been sentenced.

Mr Papalia said Hakea's prison population figures on the department's website were out of date and as at the end of last month, it housed 1,007 prisoners, when it was originally designed for 617.

The department has since confirmed Hakea's current population is 1,006. A spokesman denied there was an overcrowding problem at the prison, saying every prisoner had a cell.

The State Government is currently considering a plan to house female prisoners at Hakea in response to ongoing overcrowding at WA's main women's prison Bandyup.

Corrective Services Minister Joe Francis previously said he was confident the department could manage any issues with sending women to Hakea.

As evidence, he pointed to the prison safely housing juvenile offenders in a segregated section of Hakea after a riot at the state's youth detention centre Banksia Hill.

But the WA inspector of custodial services, Neil Morgan, has warned housing women in Hakea would be an "unmitigated failure" if not done properly.