The most senior member of the military court-martialled since WWII has won an appeal against his convictions.
Commodore Kevin Keat was found guilty last year on five charges of breaching orders by not disclosing an affair with a subordinate, not ending it, and threatening the woman and her daughter.
Mr Keat's lawyer, Michael Bott, said his client appealed on the grounds the judge misdirected the military panel that decided on the verdict and sentence.
Mr Bott said this meant the convictions were unsafe and had to be quashed.
The appeal court judgement centred on the failure of the Chief Judge of the Court Martial, Chris Hodson QC, to fairly put the defence case to the military members of the court martial in his summing up.
The defence said the woman Mr Keat was having the affair with, whose name has been suppressed, was a bully and intimidated Mr Keat's wife.
The judgement said the judge also failed to go into Mr Keat's state of mind at the time of the alleged offending and failed to remind the military members that just because Mr Keat was dishonest in one regard did not mean he was dishonest in general.
After a career spanning 37 years, Kevin Keat was dismissed from the Navy last year.
The complainant was a civilian employee of the Defence Force at the time.
The Court Martial Appeal Court will now decide if there should be a retrial.
A defence force spokesperson declined to comment.