One of WA's most dangerous sex offenders has been released from prison on Wednesday despite a judge saying the man with a criminal history spanning over more than 40 years remains a serious danger to the community.

Edward William Latimer, 61, has a criminal record dating back to his teenage years and has spent most of his adult life in prison. Credit:9 News Perth

Edward William Latimer, 61, who has a history of committing crimes out of boredom and loneliness, has been granted freedom from a West Australian prison, but a court order prevents the publication of the place where he will be living, 9 News Perth reports.

Latimer has a criminal record dating back to his teenage years and has spent most of his adult life in prison for offences including sexual assaults and wilful exposure.

He will be able to visit prostitutes in a bid to reduce his risk of reoffending.