Yanis Varoufakis has been accused of committing treason by secretly collecting online tax codes of state employees as part of contingency planning in the event of Greece being forced out of the euro.

The allegations were made this week after private lawsuits were filed by the mayor of Stylida, Apostolos Gletsos, and leader of the Teleia party, Panayiotis Giannopoulos.

A Greek prosecutor has opened an investigation into whether laws were violated during contingency planning.

The inquiry will not focus on Varoufakis himself, since courts are unable to investigate ministers or lawmakers, who enjoy parliamentary immunity from prosecution.

Rather it will look into media reports of the plan to see whether personal data protection laws were broken or and a breach of duty was committed.

In response, Varoufakis said the working group established to look at potential arrangements if Greece was forced to consider an alternative currency was entirely above board.

“[It] worked exclusively within the framework of government policy and its recommendations were always aimed at serving the public interest, at respecting the laws of the land, and at keeping the country in the eurozone,” he said.

The working group was tasked by the Tsipras government to ensure the ongoing payment of state employees through a parallel payment system, if it became necessary.

Varoufakis has described the allegations as “bizarre” and said that they reflect “a determined effort to delegitimise our five-month (25 January to 5 July 2015) negotiation with a troika incensed that we had the audacity to dispute the wisdom and efficacy of its failed program for Greece”.

The former minister added defiantly: “The Greek government has a duty to recover national and democratic sovereignty over all departments of state. In my ministerial endeavours, my team and I devised innovative methods for developing the Finance Ministry’s tools to deal efficiently with the troika-induced liquidity crunch.

“Instead of indicting, and persecuting, those who, to this day, function within the public sector as the troika’s minions and lieutenants (while receiving their substantial salaries from the long-suffering Greek taxpayers), politicians and parties whom the electorate condemned for their efforts to turn Greece into a protectorate, are now persecuting me, aided and abetted by the oligarchs’ media. I wear their accusations as badges of honour.”