The commander of the country's elite special forces has pleaded guilty to accidentally firing his weapon during a visit to the front lines of northern Iraq late last year.

Maj.-Gen. Mike Rouleau was tried by court martial on Tuesday over an incident that took place last December as he visited troops involved in training Kurdish fighters, west of Erbil.

He faced a single charge of prejudice to good order and discipline related to the "negligent discharge" of a firearm last year following a lengthy investigation by military police.

The incident took place on Dec. 20, 2015.

The maximum penalty for the offence is dismissal from service, but the military judge fined Rouleau $2,000, citing his clear service record, his history with JTF-2 — the country's highly trained counterterrorism force — and the fact he pleaded guilty.

"Clearly you accept full responsibility," said Lt.-Col. Louis-Vincent d'Auteuil, who presided over the court martial.

It was, the judge said, "an isolated incident" and out of character for Rouleau, who is a combat veteran of special forces missions.

The court martial was told Rouleau was at a combat outpost, preparing to go forward to the front line, after presenting medals to a handful of his troops. He accidentally fired once while loading his C-8 assault rifle and the bullet struck less than a metre from the soldier who accompanied him. No one was injured.

After the shot was fired, Rouleau said: "I can't believe that happened."

He returned to base and told his soldiers what happened, promising to report the incident to the chief of the defence staff, Gen. Jonathan Vance.

'I accept fully the decision'

Following the court martial, Rouleau said Tuesday he was happy to put the incident behind him.

"I accept fully the decision of the judge today at the court martial," he said. "I accepted responsibility for this from the day it happened and so I'm very pleased with the result."

The accountability rules for generals are the same as those for the privates and the corporals, said Rouleau.

Most negligent discharge accusations are dealt with through a summary trial process, but Rouleau's senior rank means his options become limited, said Maj. Chavi Walsh, the prosecutor who tried the case.

"Due to the rank of the offender, we have regulations that [require] flag officers to have a full court martial," he said. "It has to do with the limited amount of people who can try them."

Weapons-handling mistakes are a matter of grave importance in the army and in some cases have helped end careers. But Vance, the country's top military commander, put out a statement late Tuesday giving Rouleau his full backing.

"The ruling today not only reaffirms the value in having a strong justice system, but also the requirement to hold everyone in the Canadian Armed Forces accountable for their actions," Vance said.

"I am impressed with the professionalism Maj.-Gen Rouleau demonstrated throughout the process and continue to have complete confidence in his ability to serve as commander of our special forces."

Rouleau is not the only senior officer to face trial for weapons mishandling.

Just over six years ago, former brigadier-general Dan Menard, who commanded Canadian troops in Kandahar, faced a similar charge in May 2010. He was fined $3,500.

Menard was later accused of having an inappropriate relationship with a subordinate female non-commissioned officer. He was relieved of his command and later resigned from the army.

Another officer, Lt.-Col. Gilles Fortin, was charged with a "negligent discharge" in relation to an incident in Kabul in 2012.

Listing a number of other incidents during Tuesday's sentencing, Walsh said he felt the fine levied on Rouleau was appropriate given the circumstances.