* Ferry workers on strike since June 24 over restructure
* Prime minister promises "any measure necessary"
* Unions consider mediator's plan to stave off liquidation (Updates with unions to vote on strike, adds union official)
MARSEILLE, France, July 9 (Reuters) - French unions at struggling ferry operator SNCM tentatively agreed to wind down a strike over restructuring plans after Prime Minister Manuel Valls threatened imminent action to break up their blockade of ports in Marseille and Corsica.
A government source said that unions and a government-mandated mediator had agreed on a plan that would keep the company afloat at least until the end of November.
Workers at the loss-making company partially owned by Veolia have been on strike since June 24, occupying ferries and blockading access to part of Marseille's port for 16 days over fears they will lose jobs and privileges.
With a plan by the mediator staving off the threat of imminent liquidation, striking workers would vote on Thursday whether to return to work, CGT union official Frederic Alpozzo said.
The government source said that four SNCM ships were already on Wednesday night being prepared to take to sea on Thursday.
The strike has left the island in part cut off from the mainland at the peak of the tourist season vital to Corsica's economy while holding up the flow of goods.
Valls, who has warned repeatedly that the strike could condemn the SNCM "to death", denounced violent clashes between police and strikers near the port of Marseille and said the government would act swiftly to end blockades.
"The blockades of boats and the violence at the ports are unacceptable," he told parliament during question time. "The government will take any measure necessary within coming hours to make sure these blockages end."
Strikers used a truck to block access to the Kalliste ferry - which is not operated by the SNCM - in the port of Marseille for more than a week, stopping freight from being unloaded.
In a sign of goodwill, strikers allowed access to the ferry following progress in talks on Wednesday.
Workers have also occupied several ferries, stopping some 230,000 tourists from reaching the island at a cost of 1 million euros ($1.36 million) in missed revenue per day, Corsican tourism officials have said.
Valls and his transport minister said this week that SNCM, which is 25 percent owned by the French state, was "sinking" and needed to be placed under court protection to shield itself from a European Commission order to repay 440 million euros in state aid.
Unions reacted warmly to a plan from the mediator late on Wednesday as liquidation was no longer the prime scenario, at least for the time being.
"We've saved the company until Nov. 30. The time will be used to work on the dispute between the European Union and SNCM, the company's survival and finding a buyer," Alpozzo said.
"Everyone wants to avoid liquidation."
Owned 66 percent by Transdev - a public transport joint venture between water and waste group Veolia Environnement and state-bank CDC - the ferry operator has racked up cumulative losses of 250 million euros over the past decade despite subsidies it receives from French authorities.
Transdev and the government prefer a Chapter 11-style restructuring that could allow new owners to buy and operate SNCM's ships. For their part, the strikers want assurances that promises to limit job cuts under a past plan will be respected and that investments will be made.
The stalemate is holding up Veolia's plans to sell to CDC most of its stake in Transdev - a tram, train and bus operator with turnover of 7 billion euros and 90,000 staff in more than 20 countries.
$1 = 0.7331 Euros Reporting by Francois Revilla and Roger Nicoli in Bastia, Corsica; Writing by Nicholas Vinocur and Leigh Thomas; Editing by Ralph Boulton, Robin Pomeroy and Lisa Shumaker