Charges against a high-ranking military officer accused of sex crimes were withdrawn in an Edmonton courtroom Friday.

The Crown prosecutor asked a Court of Queen's Bench judge to withdraw all charges against Lt.-Col. Mason Stalker, who was ordered earlier this year to stand trial on three counts of sexual assault and four counts of sexual exploitation following a one-day preliminary hearing.

The Crown said it concluded there was no longer a reasonable likelihood of securing a conviction.

Stalker's lawyer made no objection.

In a written statement, Stalker said he is relieved to have "this nightmare" behind him.

"I have always maintained my innocence in this matter and am reassured that due process has resulted in the withdrawal of all charges," Stalker said.

"I am very grateful for my partner, family, friends and colleagues, who have always known I'm innocent and stood by me through this nightmare," he said.

"Although I have a long path ahead to recover from the difficult strain this placed on me, my family, friends, colleagues and career, after more than 23 years of soldiering, I look forward to getting back to serving my country."

Stalker, commander of the 1st Battalion, Princess Patricia's Canadian Light Infantry in Edmonton, was arrested in 2015 on 10 charges, all relating to one complainant.

The charges relate to offences alleged to have occurred between 1998 and 2007 while Stalker, 41, was a mentor with an army cadet group in Edmonton.

Stalker had been suspended from his post pending the outcome of the court case.

In November 2012, Stalker received a Meritorious Service Medal from Gov.-Gen. David Johnston for his leadership and tactical skills as the commanding officer in a volatile and violent region of Afghanistan.