Militant tobacco workers in Turkey are on the verge of an unlikely victory over the government after a bitter industrial dispute marked by hunger strikes, violent clashes with riot police and a siege of the governing party headquarters.

A dispute that has threatened to spill over into class warfare was triggered last month when the ruling Justice and Development party (AKP) announced the closure of 12 factories belonging to Tekel, the former state tobacco and alcohol monopoly.

The closure plan was drawn up after Tekel was sold for £1.1bn to British and American Tobacco last year under the government's privatisation programme.

Workers reacted with outrage after learning they would be redeployed in temporary public sector jobs on reduced pay and conditions. They said the changes would cut their monthly wage from £550 to about £311 and leave them without any severance pay.

Buses carrying an estimated 12,000 employees descended on the capital, Ankara, from factories all over the country. Angry workers were confronted by police firing teargas and pepper spray when they staged a demonstration outside the AKP's headquarters.

The scenes prompted condemnation from the prime minister, Recep Tayyip Erdogan, who accused the protesters of being influenced by opposition parties and extremist groups. He said the government would not "dole out money to workers for not producing anything" and challenged them to start their own businesses.

Now Erdogan has been forced into an uncharacteristic climbdown after Turkey's main trade union organisation, Turk-Is, said it would call a general strike next Wednesday unless the workers' demands for jobs with equal pay and conditions were met.

At a meeting with Turk-Is leaders and Tekel workers' representatives on Thursday, the prime minister ordered the finance minister, Mehmet Simsek. and the labour minister, Hayati Yazici, to find a formula to resolve the dispute by Monday.

That was enough to persuade Tekel workers to postpone a hunger strike planned to start today.

The dispute, which began on 15 December, has already seen several protesters admitted to hospital after refusing food and water.

Workers have occupied the ­Turk-Is headquarters and braved freezing temperatures to sleep in tents outside the AKP headquarters. Compelling media images of the protests have provoked angry rows in parliament. Analysts believe the situation has inflicted political damage on a government heavily reliant on conservative working-class support.

"The government has been pursuing a neo-liberal policy and trying to cancel the job guarantees of the workers. But image-wise the consequences have been devastating," said Cengiz Aktar, a political analyst at Bahcesehir University, in Istanbul. "The government doesn't want 12,000-plus workers and public opinion turning against them. We should never forget that this government was re-elected in a landslide in 2007 due to the economy. That's the main reason people voted for them."

The prospect of a victory for the Tekel workers follows the violent suppression of strikes by firefighters and railway workers. Industrial disputes in Turkey are subject to restrictive laws introduced after a military coup in 1980.