The Defence Force has settled a long-running defamation claim against it by war reporter Jon Stephenson.
It has agreed to make a payment to Mr Stephenson and has expressed "regret".
Mr Stephenson had claimed $500,000 in damages.
Mr Stephenson this morning said in a statement that he could not comment on the amount.
"The sum is confidential, but I can say that I am very happy and consider the outcome a victory." Settlement was reached last Friday, three years after Mr Stephenson sued.
"I pursued legal action for the simple reason that journalists holding the powers-that-be to account should not be subjected to false claims. It is regrettable that the defendants chose to prolong this matter, at significant cost to the taxpayer, when it could have been resolved much earlier."
The journalist sued the Defence Force chief at the time Lieutenant General Rhys Jones, and the force, claiming he was defamed in a press release Mr Jones issued in May 2011 in response to a Metro magazine article by Mr Stephenson about the handling of detainees in Afghanistan and whether SAS troops had passed prisoners to authorities known to use torture.
The journalist argued that words in the press release meant that he had made up an account about visiting an Afghan police Crisis Response Unit base in Kabul and interviewing the commander there.
In a statement this afternoon the Defence Force said it and Mr Jones now accept that Mr Stephenson did in fact gain entry to the base and interviewed the CRU commander.
"They regret that their statement may have been interpreted as suggesting that this had not happened.
The parties have reached a settlement in this matter. This statement is issued as part of that settlement, which also includes a payment to Mr Stephenson."
Prime Minister John Key also attacked Mr Stephenson's credibility at the time.
"I've got no reason for the NZDF to be lying, and I've found [Mr Stephenson] myself personally not to be credible," Mr Key said in May 2011.
A spokesman for the Prime Minister today said Mr Key has nothing to add.
The press release was still on the Defence Force website two years later when the trial started.
But in the course of the hearing and in response to testimony by the journalist, Mr Jones accepted Mr Stephenson had gone to the base and probably spoken to the commander.
Despite the judge directing the jury that there was now no challenge to Mr Stephenson's account of the visit, the jury didn't reach a verdict at the end of the trial in July 2013.
The defendants argued the words in the press release didn't hold the meaning alleged, or were defamatory.
An attempt to strike out part of Mr Stephenson's claim on this basis was unsuccessful; the High Court decided it would leave it to a jury at retrial to decide what Mr Jones' words meant.
With the parties having reached settlement, that will now not occur.
Mr Stephenson's Metro article, Eyes Wide Shut: The Government's Guilty Secrets in Afghanistan, won the international journalism award, the Bayeux-Calvados Prize for War Correspondents and the top investigative award at the 2012 New Zealand Canon Media Awards.
Simon Wilson, the magazine's editor at the time, recently described the article as "the single most important piece of journalism" published in his six years at the helm.
"I told my boss that we had this story and it was going to be extremely embarrassing for the government - though I didn't tell them that we were going to publish it without talking to them, because they [the Government] would try and close us down," Wilson, currently Metro's editor-at-large, told website The Spinoff.
"But when I told [the publisher] about the story and what it was, he took a deep breath and he said, 'we've got to do it'."
Lieutenant General Tim Keating replaced Lieutenant General Rhys Jones, who left the Defence Force after a 35-year career, in January 2014. Mr Keating is a former head of the army and has also commanded the elite SAS group.
Read Mr Stephenson's full statement: