A B.C. airline employee lost her airport security clearance after she was arrested outside a drug house during a dramatic police raid in which officers found a hidden compartment in her car that was stuffed with drugs and a loaded pistol.

She has now also lost her appeal to get her job back.

Marilyn Thep-Outhainthany was waiting in the passenger seat of a car for her husband, who had gone inside a house in Surrey, B.C., to run an errand, in 2007.

Their timing was terrible — police were just swooping in on a drug raid. Officers chased after fleeing suspects, people in the house were arrested at gunpoint and police shot a belligerent dog.

In the chaos, Ms. Thep-Outhainthany and her husband were both arrested.

A search of their car, which was registered to her mother but to which she was listed as the principal driver, revealed a secret compartment containing a load handgun and a substantial amount of cocaine, heroin, methamphetamine and ecstasy.

Both of them were charged with four counts of possession for the purposes of trafficking and one of possessing a loaded prohibited firearm.

In court, her husband pleaded guilty to being involved in a sophisticated “dial-a-dope” drug trafficking operation; prosecutors stayed the charges against Ms. Thep-Outhainthany.

The couple separated and Ms. Thep-Outhainthany changed her name and landed a job at WestJet, a position dependent on her obtaining security clearance to allow her to work at Vancouver International Airport.

It was during a background check for her application for a restricted area identity card that the drug incident was revisted. Even though she was not convicted and the arrest was expunged from Canadian Police Information Centre records, it remained in the files of the RCMP.

Last year, the Minister of Transport denied her security clearance, based on the unanimous recommendation of an advisory board.

The board reasoned she remained a risk as someone who “may be prone or induced” to become involved in a criminal act.

Ms. Thep-Outhainthany appealed the decision to the Federal Court of Canada.

Justice Donald Rennie upheld the minister’s decision.

“While there may not have been sufficient evidence to convict the applicant, the facts reasonably support a belief she was either closely connected to this activity or willfully blind to it,” he wrote in his decision, released last week.

“Cocaine and heroin are imported into Canada and the applicant’s access to a restricted area of an airport could attract the attention of her husband or his criminal associates.”

Judge Rennie dismissed Ms. Thep-Outhainthany’s argument that because she was never convicted the incident should not count against her.

“The fact that the charges were stayed against the applicant is not determinative. Prosecutions proceed, or do not proceed, for a variety of reasons; hence the absence of a conviction is not determinative,” Judge Rennie wrote.

“A criminal conviction is sustained on proof beyond a reasonable doubt. Denial of a security clearance requires only a reasonable belief, on a balance of probabilities, that a person may be prone to or induced to commit an act that may interfere with civil aviation.”

He ruled the Aeronautics Act gives the minister discretion to grant or refuse security clearance.

Christopher Rootham, an Ottawa lawyer who represented Ms. Thep-Outhainthany in court, declined to comment on the outcome.

The decision could be appealed to the Federal Court of Appeal but Mr. Rootham also declined to say if an appeal was being considered.