Contract workers at the oil refinery walked out over job losses
Construction workers at the Total-run Lindsey oil refinery have voted to accept a deal that will see them return to work after a bitter jobs dispute.
At a meeting at the North Lincolnshire site, unions recommended that workers back a deal thrashed out last week.
It will see 647 workers sacked for taking unofficial strike action get their jobs back - a move hailed by the GMB as an "unprecedented victory".
Total said it was pleased the workers had voted to return.
The row had led to a number of sympathy strikes across Britain, with thousands of workers walking out.
Addressing hundreds of people outside the refinery on Monday, the GMB union's shop steward Kenny Ward described Thursday's late-night deal as a "smack in the face for the employers, a realisation that they need to take a step back".
He added: "In my opinion we have achieved an unprecedented victory, not just for us but on a legal front as well, so I recommend and we recommend as the shop stewards committee that you vote 'yes' and we return to work."
BBC employment correspondent
The wider significance of the strike cannot be ignored.
This was a dispute which ran outside the law and still succeeded. The strikers did not wait for a ballot to walk out, nor did they observe the legal obligation to notify the employers of their withdrawal of labour.
Instead they just downed tools and left, to be rapidly followed by colleagues at other sites around the UK who also went on strike in sympathy, taking secondary action, which may well have been outside the law as well.
Union leaders could not even get involved with the organisation of the strikes, for fear of legal reprisals. In the view of Bob Crow, of the RMT, the dispute shows that government employment laws can be defeated.
There's certainly no doubt also that wildcat strikes are back on the agenda.
Unite's assistant general secretary, Les Bayliss, said the decision showed "just how much can be achieved through constructive negotiations".
He added: "We hope that the lessons learned at Lindsey are not forgotten. As the biggest union in construction we look forward to a new chapter of industrial relations in construction. I hope the employers do too."
Mr Bayliss said his union would have accepted nothing less than full reinstatement of the workers.
The workers involved in the dispute are contracted construction workers working on a major expansion project at the refinery.
The project is said to be £85m over-budget and massively behind schedule.
A spokesman for Total told the BBC: "Total is pleased that the HDS-3 unit workers have voted to return to work.
"We look forward to the project getting back on track and completed as soon as possible with no further disruption or additional costs."
The contract workers first went out on unofficial strike on 11 June after a sub-contractor cut 51 jobs.
In the following days, 647 of them were sacked.
There followed further wildcat strikes at the Lindsey refinery and at other power stations and oil and gas plants across the UK, involving thousands of workers
Unions now say they have secured other jobs for the 51 workers as well as reinstating the 647 employees who were sacked.
The unions say they also won a guarantee of no victimisation against workers across the country who took sympathy action.
During the dispute, sympathy strikes spread to power stations including Drax and Eggborough, in Yorkshire, Ratcliffe, in Nottinghamshire, and BP's Saltend refinery near Hull.
Workers also went out at the BOC oxygen plant at Scunthorpe, Fiddlers Ferry in Cheshire and Aberthaw in south Wales.
The Lindsey refinery also suffered strikes earlier this year over the employment of non-UK workers.