A former Australian army lawyer has been jailed for leaking to the media classified information that exposed allegations of Australian war crimes in Afghanistan.

David McBride, 60, was sentenced at a court in the capital, Canberra, to five years and eight months in prison after pleading guilty to three charges including theft and sharing with members of the press documents classified as secret. He had faced a potential life sentence.

Justice David Mossop ordered McBride to serve 27 months in prison before he can be considered for release on parole.

Human rights advocates argued that McBride’s conviction and sentencing – before any alleged war criminal he helped expose – reflected a lack of whistleblower protections in Australia.

A lawyer for McBride, Mark Davis, said that his legal team would appeal a ruling that prevented McBride from mounting a defence.

Judge Mossop ruled in November last year that McBride had no duty as an army officer beyond following orders.

“We know that the Australian military teach a much broader notion of what the duty of an officer is in a battle field than to follow orders,” Mr Davis said.

Mr Davis said the severity of the sentence also created grounds for appeal, but their effort would focus on the earlier ruling.

McBride’s documents formed the basis of an Australian Broadcasting Corp seven-part television series in 2017 that contained war crime allegations including that Australian Special Air Service Regiment soldiers killed unarmed Afghan men and children in 2013.

Police raided the ABC’s Sydney headquarters in 2019 in search of evidence of a leak but decided against charging the two reporters responsible for the investigation.

In sentencing, Judge Mossop said he did not accept McBride’s explanation that he thought a court would vindicate him for acting in the public interest.

McBride’s argument that his suspicions that the higher echelons of the Australian Defence Force were engaged in criminal activity obliged him to disclose classified papers “didn’t reflect reality”, Judge Mossop said.

An Australian military report released in 2020 found evidence that troops unlawfully killed 39 Afghan prisoners, farmers and civilians. The report recommended 19 current and former soldiers face criminal investigation.

Police are working with the Office of the Special Investigator, an Australian investigation agency established in 2021, to build cases against elite SAS and Commando Regiments troops who served in Afghanistan between 2005 and 2016.

Former SAS member Oliver Schulz last year became the first of these veterans to be charged with a war crime. He is accused of shooting dead a non-combatant man in a wheat field in Uruzgan province in 2012

Also last year, a civil court found Australia’s most decorated living war veteran Ben Roberts-Smith had likely unlawfully killed four Afghans. He has not been criminally charged.

Human Rights Watch’s Australia director Daniela Gavshon said McBride’s sentencing was evidence Australia’s whistleblowing laws needed exemptions in the public interest.

“It is a stain on Australia’s reputation that some of its soldiers have been accused of war crimes in Afghanistan, and yet the first person convicted in relation to these crimes is a whistleblower not the abusers,” Ms Gavshon said in a statement.

“David McBride’s jail sentence reinforces that whistleblowers are not protected by Australian law. It will create a chilling effect on those taking risks to push for transparency and accountability – cornerstones of democracy,” she added.