By Sergio Goncalves and Catarina Demony
LISBON (Reuters) - Portuguese Prime Minister Antonio Costa threatened to resign on Friday after his leftist allies abandoned the government in a parliamentary vote that could undermine efforts to balance the budget by raising teachers' salaries retroactively.
Late on Thursday, a broad alliance of lawmakers sitting on a parliamentary committee voted to grant teachers salary increases held back over several years since 2005.
Costa called an emergency government meeting on Friday, after which he met President Marcelo Rebelo de Sousa for an hour and informed him that he would resign if parliament gives its full approval to the measure.
"Under these conditions, I thought it was my duty to inform the president and the head of parliament that the final approval of this initiative will force the government to submit its resignation," Costa said in a televised address to the nation.
Parliament will hold a full vote on the measure in a session on May 15. The measure would not impact this year's budget.
Losing the support of the far left Communists and Left Bloc in parliament would make it hard for the Socialists, who rule in a minority, to approve laws. Portugal is due to hold a national election in October.
"It is clear dramatisation on behalf of the government," said political scientist Antonio Costa, adding it would be a risk to the leftist parties if the government resigns. "We are six months from a general election and there is no clear benefit for the Socialists from moving it closer."
Costa has relied on the far left allies since reaching an agreement with them when he came to power in 2015.
Left Bloc leader Catarina Martins said in a Facebook post that "it appears there are attempts to create an environment of a political crisis. This environment is totally artificial".
Wages for all of the country's civil servants, including teachers, were frozen during the country's debt crisis, a measure not reversed until last year.
With an economic recovery now gathering pace, the government has faced a wave of strikes and protests from teachers, nurses, police and prison guards in the past few months to press demands for pay hikes and better working conditions.
A leading union representing police said that any pay hike for teachers should include all public sector workers.
"The measure passed yesterday in parliament is fair and will compensate teachers after all these years," said former history teacher Joaquim Rodrigues.
According to Finance Minister Mario Centeno, approving the measure could cost the country up to 800 million euros (£681 million) a year.
Opinion polls suggest the Socialists, whose management of the economic turnaround has been a hallmark of their four years in office, are likely to win the election but may be just short of a majority.
The government presented a plan last month for public accounts to swing to a surplus from 2020 following a deficit of 0.2 percent of GDP this year.
The additional payouts, which if approved would kick in from next year, could affect the plan to post a surplus, particularly as economic growth is expected to slow down this year and possibly next.
The government has suggested the unblocking of pay increases for teachers could be unconstitutional, and even if it were approved by parliament, the president would likely veto it or send it to the constitutional court for an evaluation.
But Ana Paula Coelho, an English teacher in Faro, said she and her colleagues were counting on the long overdue pay rises while their workload was only increasing in a "flawed education system" with lots of red tape, late meetings and extra hours.
(Additional reporting by Andrei Khalip; Writing by Axel Bugge and Andrei Khalip; Editing by Alison Williams)