A former Windsor police officer, facing drug related charges for possession and trafficking, has lost a challenge in court.

David Bshouty claims his rights were violated after his police locker was searched without a warrant after his arrest in 2014.

Bshouty had been arrested at the United States border for alleged drug smuggling.

While in U.S. custody, he was suspended from his job.

Bshouty told a Windsor police inspector that his revolver and pepper spray were in his locker. 

Court testimony heard the inspector wanted to be sure Bshouty's firearm was in fact, in his locker, and believed public safety was at risk if it was not.

A search of his locker turned up a bottle of Oxycotin.

After finding the pill container, the inspector put it back and got a search warrant, which led to a second search of the locker.

The judge ruled there was no breach of Bshouty's charter of rights, saying his rights were not infringed upon or violated.

The judge also said retrieving Bshouty's gun was a question of public duty and public safety.

More than a dozen Police Act charges against Bshouty were dropped, when he resigned last June.

Bshouty returns to court in October for another charter challenge, regarding the second search of his locker.