OTTAWA -- Cameron Jay Ortis, a senior RCMP official accused of breaching Canada's official-secrets law, walked out of an Ottawa courthouse Tuesday after being released on bail with strict conditions.

Under the terms, Ortis will have to live with his parents in Abbotsford, B.C., must report to the RCMP once a week and is forbidden from using any device that connects to the internet.

Ortis, 47, is charged with violating the Security of Information Act and breach of trust for allegedly disclosing secrets to an unknown recipient and planning to reveal additional classified information to an unspecified foreign entity.

He faces a total of seven counts under various provisions, with the alleged offences dating from as early as Jan. 1, 2015 through to Sept. 12 of this year.

Unlike the case for many criminal offences, Ortis had the burden of demonstrating why he should be freed on bail while he awaits trial on the secrets-law charges. No trial date has been set but Ortis is due back in court in Ottawa on Nov. 5.

Evidence at the bail hearing and reasons for the decision by Justice of the Peace Serge Legault are subject to a publication ban.

The bail conditions require that Ortis and his parents, who are acting as sureties, each post a $125,000 bond.

One of his parents must be in the B.C. residence with him at all times and accompany him on outings.

All phones, computers and tablets in the home must be password-protected and locked away when not in the possession of Ortis' parents.

In addition, Ortis cannot attend any place that has public internet access, is forbidden from possessing weapons and must surrender his passport.

His lawyer, Ian Carter, said little after the hearing but escorted Ortis, wearing a blue dress shirt and black-rimmed glasses, out of the courthouse.

Ortis had been in custody since his Sept. 12 arrest.

"Suddenly it's fall," he said, striding amid trees in full autumn blaze.

The Security of Information Act, passed following the 9/11 attacks on the United States, is intended to safeguard sensitive government secrets. Charges have been rare but Jeffrey Paul Delisle, a naval officer who gave classified material to Russia, pleaded guilty to offences under the act in 2012.

RCMP Commissioner Brenda Lucki has said the allegations against Ortis are extremely unsettling, noting that as director general of the force's National Intelligence Co-ordination Centre, he had access to information from domestic and international allies.

Lucki told a news conference last month that investigators came across documents during a joint investigation with the U.S. Federal Bureau of Investigation that led the Mounties to believe there could be some kind of "internal corruption."

The commissioner said Ortis had a valid Top Secret clearance -- which must be renewed every five years -- but he had not undergone a polygraph exam, a test which measures physiological signs such as heart rate and breathing that might indicate deception.

It turns out the RCMP does not use the polygraph for security clearances, even though a 2014 federal standard requires a lie-detector test for the highest security category, known as enhanced Top Secret.

This report by The Canadian Press was first published Oct. 22, 2019.