Four gay police officers will seek compensation after winning an anti-discrimination case against NSW Police because they were subjected to drug testing due to their sexuality.

The NSW Civil and Administrative Tribunal on Friday ruled in favour of Steven Rapisarda, Shane Housego, Christopher Sheehy and Christian McDonald, finding a superior officer was “motivated, consciously or unconsciously, to make the complaints ... by reason of their homosexuality”.

The four officers were stationed at Newtown in Sydney’s inner west in 2015 when Supt Simon Hardman referred them to the professional standards command to launch an investigation for them to undergo drug testing.

All four returned negative results.

Hardman, now employed as University of Sydney’s head of campus security, said in a signed document he suspected them of taking illicit drugs because they formed a “close-knit friendship group of homosexual like-minded” officers.

“George, Christian and Christopher are also notorious for their promiscuity,” he said.

“Drug use is thought to be fundamental in such indiscriminate sexual encounters.”

The senior officer said he was also suspicious because “George, Steven and Christian are renowned for their behaviour when out socially together” and because they frequented an Oxford Street gay bar “very well known for drug supply and drug use”.

All four officers gave evidence that they heard homophobic slurs being used by fellow police at Newtown station and McDonald said a fellow officer made “daily negative comments about gays”.

However, the tribunal ruled that did not amount to a “culture of bullying and harassment”.

“This case is significant for several reasons,” the group’s lawyer, Nicholas Stewart, said in a statement.

“Firstly, it shows that the NSW police force’s complaints system is vulnerable to misuse and abuse without independent oversight.

“Secondly, it demonstrates that in an age of progressive and inclusive corporate policies, discrimination can be found alive and well in pockets of any organisation.”

NSW police in a statement said it was reviewing the decision and considering its response.

The matter will return to the tribunal on 10 December, when the officers will seek damages for financial and emotional damage.