The state government has been accused of delaying legislation to outlaw sex between prisoners and prison guards.

Currently in Western Australia it is legal for prison officers and inmates to have consensual sex.

Up to eight children are living with their mothers at Bandyup women's prison at any given time. Credit:Photo:ABC

The situation was highlighted last week when news broke that a 31-year-old inmate at Bandyup prison had become pregnant.

A prison officer has been suspended and is being investigated for "serious misconduct" - but the guard denies any wrong-doing.