A Havant solicitor targeted by a "TV sting" has been jailed for three years.
David Lancaster, 56, from Harbourside, was convicted of inventing stories to get a man off a drugs supply offence – unaware that he was an investigative reporter telling him a cover tale.
Lancaster was told by Judge Graham Cottle at Exeter Crown Court: "You broke every rule in the book in a breatttaking display of unprofessional conduct."
The court heard that Lancaster, who served as a commander on the Royal Yacht Britannia while in the Navy, had attempted to incite Neil Ansell, a journalist with the BBC's Inside Out programme, to pervert the course of justice.
Lancaster had denied the offence.
The jury found he had provided the reporter with false explanations which had a tendency to pervert the course of a police investigation, and advised him to use them with intent to do the same.
At the time of the offence in December 2004, Lancaster was an equity partner with the Portsmouth firm of Warner, Goodman and Streat.
Lancaster has been a solicitor for 14 years, a stipendiary magistrate for four years and a court martial judge advocate for 11 years – but is no longer practising.
The court heard Ansell contacted Lancaster and posed as a client with the cover story that he had been named as the supplier of a wrap of cocaine by a friend and arrested by police.
Prosecutor Peter Blair QC said that during an appointment at his office, Lancaster invented stories that could be used when Mr Ansell answered bail.
he judge told Lancaster the British criminal justice system is held up as a model of fairness and good practice, and in order to maintain that reputation it is of paramount importance that professionals involved in the system behave at all times with honesty and integrity.