Northern Territory Magistrate Peter Maley has resigned in the wake of calls for an inquiry into his continued relationship with the ruling Country Liberals Party.
Attorney-General John Elferink had been resisting the NT Bar Association's calls to conduct an inquiry, but in a statement he said the magistrate had contacted him to resign his post.
"Tonight I was contacted by Magistrate Peter Maley who has tendered his resignation," he said.
"He has also advised the Chief Magistrate of his decision.
"I would like to thank Mr Maley for his service to the people of the Northern Territory and congratulate him for building a reputation as a fair, astute and hard-working magistrate during the short time that he was on the bench."
Mr Elferink said he understood Mr Maley would return to private practice.
Mr Maley was a former Country Liberals politician who left politics in 2005 and returned to work as a lawyer.
He was appointed a magistrate in September last year and quit the Country Liberals Party eight months later.
In January this year Mr Maley was appointed a director of Foundation 51, a research company that the Opposition has described as a CLP slush fund.
It was these two relationships, and a photo that surfaced showing Mr Maley handing out Country Liberals how-to-vote cards in the Blain by-election on April 12, that sparked calls by the NT Bar Association for an investigation.
The Northern Territory does not have a body that investigates the behaviour of judges and magistrates and the Attorney-General had repeatedly rejected suggestions that he conduct his own inquiry.
The ABC has tried to contact Mr Maley for comment.