Victoria Police's head of Professional Standards Command has resigned over racist and obscene online comments.

Assistant Commissioner Brett Guerin, an officer for 40 years and head of Professional Standards, was referred to the anti-corruption watchdog after Fairfax revealed he posted bizarre and bigoted comments under the online pseudonym “Vernon Demerest” (a character from the 1970 film Airplane).

Mr Guerin made vile posts on YouTube videos and social media over the course of several years.

He was referred to the Independent Broad-based Anti-corruption Commission (IBAC) after he was linked to offensive comments about former Chief Commissioner Christine Nixon and former Police Association boss Paul Mullett on a blog.

Just an hour after more reports appeared in The Age, Mr Guerin resigned from Victoria Police.

The IBAC investigation is expected to go ahead.

On a video of a Somali pirate attack, Mr Guerin wrote: “I'm afraid this is what happens when the lash is abolished. The jigaboo runs riot and out of control. The 'boo needs the lash. The 'boo wants the lash. Deep, deep down the 'boo knows the lash provides the governance and stability”.

Under the “Demerest” pseudonym, Mr Guerin wrote in August 2016 that: “She [Ms Nixon] bent the Mulletmeister [Mr Mullett] over and slipped a rather large schlong up his date courtesy of the Supreme Court's decision this morning”.

Many of the former cop’s other comments followed similar lines.

When Carlton beat Richmond in the AFL in 2013, “Demerest” commented: “Always important, Richmond, to stretch the hamstrings before bending over and touching one's toes to receive turgid blue schlong up the date. But then again, Richmond hammies must be used to that action by now.”

On a video of Australian batsman David Warner scoring 89 runs against South Africa, he wrote: “South Africa. Bent, spread, lubed and reamed. And reamed. And reamed. Ouch”.

On a video of NRL team Melbourne Storm beating Parramatta, he wrote: “Yes, the Eels certainly had their pants lowered, were bent over and reamed (without KY) by the mighty Storm. Ouch”.

When the Australian Rugby League team defeated New Zealand, he wrote: “Very inspiring stuff. It was for the Aussies last night, at least, when they de-trousered, bent and lubed the Kiwis before reaming them with turgid Aussie schlong. Ouch”.

Mr Guerin also bizarrely claimed that women could not sing Australia's national anthem.

“The National Anthem must never be improvised. It must always be sung by a male. A baritone. And accompanied by a band. No argument. No opinion. Just fact,” he posted.

Victoria Police issued a statement saying: “In accordance with his obligations under the Victoria Police Act, Chief Commissioner Graham Ashton has referred a matter involving allegations against Assistant Commissioner Brett Guerin to IBAC”.

“As the matter is now with IBAC for its consideration it would not be appropriate to comment further.”