Slovenia’s prime minister has said he will resign after the country’s top court annulled last year’s referendum on a key railway project and ordered a new vote.

Miro Cerar said he has sent his resignation to Parliament and will formally notify the president on Thursday.

The move means that Slovenia’s parliamentary election, which was due in early June, will be held a few weeks earlier.

“I have made a decision any trustworthy politician should make in such a situation,” Mr Cerar said in a statement broadcast live in Slovenia.

“You (citizens) will have a chance in the elections to judge between right and wrong and who deserves your support.”

Mr Cerar also praised his centre-left government’s achievements.

“During my term, the economic crisis ended. Slovenia has stable economic growth, third strongest in the EU,” he said. “We have the lowest unemployment rate after 2009.”

The government has also faced a wave of strikes and protests by public sector workers demanding higher wages amid economic recovery. Many schools in Slovenia were closed on Wednesday as teachers went on strike for the second time in a month.

Slovenia’s Supreme Court ruled earlier on Wednesday that government backing for the project during the referendum campaign was one-sided and could have affected the outcome of the vote.

The referendum last September approved the government’s plan to build 16 miles of additional railway linking the Adriatic port of Koper with the Divaca hub near the border with Italy.

The vote was initiated by independent campaigner Vili Kovacic who also took the issue to Slovenia’s top courts. Mr Kovacic was supported by some opposition parties.

Mr Cerar said the railway project is of “strategic importance for the development of Slovenia”. He complained that “some are jeopardising Slovenia’s development”.

The date for the new referendum was not immediately set.