THREE senior police officers have been suspended for allegedly returning positive drug tests - including for cocaine - after attending a police function.

Two serving NSW Police Force officers and one Australian Federal Police officer were ordered to undergo tests as part of an internal investigation into alleged recreational drug use among officers. The officers involved, all aged in their 40s, had previously unblemished records, reported The Daily Telegraph.

Two of the officers hold the rank of inspector at regional NSW police commands while the third is a former NSW police officer who is now a sky marshal with the AFP.

One of the officers involved is the recipient of a bravery medal while two have been part of investigations into some of the state's most high-profile cases.

Sky marshals, or air security officers, are armed and travel incognito on domestic and international flights to deal with violence, including terror attacks.

All three officers were at an unofficial police function in Paddington, in Sydney's east, on Friday, August 5, that was attended by dozens of senior serving and former police.

In the three days following the function the two serving NSW officers were ordered to undergo tests and were allegedly found to have cocaine in their system. The AFP officer was also drug tested.

It is unclear whether the three took drugs at the function or afterwards, however drugs can remain detectable days after ingestion. There is no suggestion anyone else who attended the function had taken drugs or had any knowledge of drug-taking.

An inquiry by the Professional Standards Command, which investigates allegations of NSW police misconduct, is believed to be continuing. At this stage there is no suggestion drugs were being taken by officers while on duty.

A NSW Police spokeswoman said: "Two commissioned officers attached to local area commands within the Northern Region have been suspended after a positive drug test."

An AFP spokeswoman said the AFP's Professional Standards Internal Investigation Unit was "aware of the incident" and was investigating.

"An officer has been suspended without pay until the completion of the investigation," she said.

Deputy Police Commissioner Dave Owens issued a warning that drug use by police would not be tolerated: "The NSW Police Force has very firm policies and procedures which set out the standards we require of serving officers."

The NSW Police Force can randomly test officers for drugs but targeted tests are less common and are usually based on intelligence received. Cases of officers recalled to duty to specifically undergo tests are believed to be rare.