It's been one of the great mysteries of the case against former spy Witness K and his lawyer, Bernard Collaery.

Key points: Four Corners understands former attorney-general George Brandis had misgivings about prosecuting Witness K and Collaery.

Four Corners understands former attorney-general George Brandis had misgivings about prosecuting Witness K and Collaery. It is also understood there were divisions about prosecuting among Australia's national security agencies.

It is also understood there were divisions about prosecuting among Australia's national security agencies. Lawyers and politicians have questioned whether the case is in the public interest.

Why did it take so long to launch a prosecution against the pair?

In December 2013, ASIO and the AFP raided the homes of Witness K and Mr Collaery. But it wasn't until May 2018 that the pair learned they were facing potential jail terms for allegedly breaching the Intelligence Services Act and the Criminal Code.

The pair are accused of disclosing secret information. That information related to an operation conducted by Australia's foreign intelligence agency, ASIS, to bug the office of Timor-Leste's prime minister during oil and gas treaty negotiations in 2004.

Because of the nature of the allegations, the attorney-general had to give consent to the prosecution before it could go ahead.

Former attorney-general George Brandis was first asked by the Commonwealth Director of Public Prosecutions (CDPP) for consent in September 2015.

Over the next two years and three months, Mr Brandis received advice on the matter from two different DPPs and the Solicitor-General. By the time he stood down to become High Commissioner in London in 2017, he had still not given his approval.

His successor, Christian Porter, gave consent to prosecute within six months of taking office.

So why the different approach from two attorneys-general from the same government?

Loading...

'Not a straightforward case'

Four Corners understands Mr Brandis had misgivings about approving a prosecution and that there were divisions among the national security agencies about the wisdom of prosecuting Mr Collaery and Witness K.

Bret Walker SC is a former lawyer for Witness K and the former independent monitor of Australia's national security legislation.

Contact Steve Cannane

He told Four Corners he believed Mr Brandis would have been considering the ramifications of prosecuting.

"I imagine the former attorney, Senator Brandis, didn't find this a straightforward case to say yes to," he said.

"That's a very long time for something to be sitting on an attorney's desk. I imagine it was not for want of thinking about it, that that time elapsed."

Supporters of Bernard Collaery and Witness K staged a protest outside court in Canberra earlier this month. ( AAP: Lukas Coch )

Independent MP Andrew Wilkie says the revelation underlines that this is a political decision.

"The fact that the former attorney-general did not pursue it and the current Attorney-General is pursuing it, really makes clear to everyone that this is an intensely political decision in an intensely political environment," he said.

"In other words, it's nothing to do with justice being done. It's about making a political decision, punishing someone and deterring others."

Mr Brandis declined to be interviewed by Four Corners.

'Reasonable prospect of conviction'

Lawyer Bernard Collaery faces a potential jail term for allegedly breaching the Intelligence Services Act and the Criminal Code. ( ABC News: Nick Haggarty )

In a statement, Mr Porter said his decision was based on independent advice.

"The entire process was considered, thorough and detailed and the culmination of this process was that I ultimately consented to the Commonwealth DPP's independently formulated and determined request to prosecute, in so doing close attention and consideration was given to the totality of the CDPP's advice and all the relevant evidence."

Mr Porter said the office of the CDPP concluded: "There is a reasonable prospect of conviction based on the evidence against the accused and that the prosecution allowing for matters such as the seriousness of the offence and the strength of the evidence is in the public interest."

Former Victorian premier Steve Bracks, a longtime adviser to Timor-Leste on governance issues, has called on the Attorney-General to explain why the prosecution is in the public interest.

"It would be nice to know why the Attorney-General, Christian Porter, thought it was in the public interest to proceed," he told Four Corners.

"If it was right and proper to proceed, they would have proceeded at the point at which they had this material (to prosecute), which was several years ago."

Sign up to the Four Corners newsletter Get the best investigative journalism, delivered to your inbox. Your information is handled in accordance with the ABC Privacy Collection Statement Email address Subscribe

According to the Commonwealth DPP's prosecution policy, "it must be evident from the facts of the case, and all surrounding circumstances, that the prosecution would be in the public interest."

Former Supreme Court judge Stephen Charles says this prosecution is "quite plainly not in the public interest".

As a barrister, Mr Charles represented both ASIO and ASIS. He believes that Australia is better off knowing what its foreign agents were doing in Dili in 2004.

"There is plainly a much greater public interest and benefit in the exposure of what Australia had done in its grossly unfair eavesdropping on the Timorese cabinet deliberations."

Andrew Wilkie believes it is time Australia legislated to protect whistleblowers and increase transparency in government.

"I feel we're living in very dangerous times here in Australia, there is clearly a reduction in civil liberties," he said.

"Whistleblowers are being pursued in the courts, journalists are being raided, I would characterise it as being in a pre-police state, which, left unchecked, will get even worse, and one day we'll wake up and wonder how on earth we got here."

Watch Steve Cannane's investigation tonight on Four Corners at 8.30pm on ABC TV and iview.