The Isle of Man's attorney general "laid a false trail of lies to conceal professional misconduct", a court has heard.
Prosecuting QC Peter Wright told Douglas courthouse Stephen Harding knowingly lied under oath and submitted false documents to an advocates tribunal in 2010.
Fifty-two-year-old Mr Harding from Glen Vine was suspended from his role as the main legal adviser to the Isle of Man government last year.
He faces two charges, one of perjury and one of acts against public justice.
The charges date back to a period between April and September 2010 when Mr Harding was a government advocate.
At Douglas courthouse today the jury was told the story behind the trial began in 2009 when a local property development company, Street Heritage Ltd, found itself in financial trouble, with a tax bill of more than £180,000.
After failing to come up with a convincing repayment plan, a court date of February 24 2010 was set, to begin the process of liquidation.
That was something Street Heritage's directors, Jonathan and Jamie Irving, were keen to avoid.
The court was told today that in the run-up to that hearing the Irvings had progressed plans to pay off their bill by advancing the sale of a property and securing a personal loan.
As such, Street Heritage Ltd planned to ask the courts for more time, something Mr Harding had been made well aware of at the time, according to the prosecution.
But, due to a timing error, the Irvings and their advocate did not appear in court on the day set for the hearing- and Mr Harding remained silent about the company's progress in finding money to meet their tax commitment.
It was a "failure in his public duty", said the prosecution- and something which resulted in a formal reprimand during an advocates tribunal later that year.
The tribunal however, found that Mr Harding's professional misconduct was an "isolated incident" and a few months later, in September 2010, he applied for the position of attorney general.
His appointment was announced by the Isle of Man government on November 16 2010, something which would never have happened, said Mr Wright QC, had the advocates tribunal known the full facts.
These facts, according to the prosecution, include lying on oath about a telephone conversation (which the prosecution alleges never happened) and creating a false record of this telephone conversation to cover up his lies.
When Mr Harding's "acts of concealment were revealed" in a subsequent police investigation, according to Mr Wright QC, Mr Harding allegedly stated he had been unwell at the time and his judgement "may have been clouded".
But, continued the prosecution, if Mr Harding was well enough to apply for the Island's top legal job just a few weeks later, he must have known exactly what he was doing when he chose to "conceal his misconduct".
Mr Harding denies both charges against him - the trial continues.