The owners of the giant Grangemouth petrochemical site have decided to keep it open, saving thousands of jobs from being lost.

The move followed acceptance by the Unite union of a survival plan, including a pay freeze, ending of the final salary pension scheme and other changes to terms and conditions.

Ineos had said it would close the site, which employs 800 employees, after workers refused to sign up to the changes.

But it said today it would immediately reopen the site and the adjoining oil refinery, which have been shut down for the past week as a result of the dispute.

A number of contractors have been laid off or switched to other sites.

Workers heard the news at a meeting with managers this morning.

Politicians from the UK and Scottish governments have been pressing the two sides to break the deadlocked row, warning of the grim impact on the economy if the plant had closed.

Unite's general secretary Len McCluskey met shop stewards and managers at Grangemouth yesterday after announcing that the union had decided to "embrace" the survival plan.

Ineos has said the site is losing £10 million a month.

Calum MacLean, Grangemouth chairman said: "Unite risked 800 jobs and one of the UK's largest manufacturing facilities over a union official investigation before any verdict had been announced.

"It then advised employees to reject the change essential to the survival of Grangemouth. Today's U-turn means Grangemouth now has an excellent future."

Ineos said in a statement: "Unite's withdrawal of its opposition to the company's survival plan , which was already supported by 50% of employees on the site, has allowed the shareholders to invest a further £300 million in the company.

"This money will be used to fund ongoing losses and to finance the building of a gas terminal to bring in shale gas ethane from the USA.

"The Scottish government has indicated it will support the company's application for a £9 million grant to help finance the terminal and the UK Government has given its prequalification approval for a £125 million loan guarantee facility."

Jim Ratcliffe, the chairman of Ineos Group, said: "This is a victory for common sense. Unite advised employees to reject change and vote for closure. Thank goodness people finally came to their senses. Grangemouth now has a great future."

Ineos said Unite had made a "dramatic U-turn" and had agreed to a three-year pay freeze, no strikes for three years, moving to a "modern" pension scheme and changes to union agreements on the site including no full-time union convenors.

Downing Street said Prime Minister David Cameron's priority was to ensure the business survived.

"Any progress in that direction is very encouraging," a No 10 spokesman said.

The spokesman said the Government had been working "very closely" with the Scottish Government on the issue.

First Minister Alex Salmond said: "This news is a tremendous fillip for the workforce and the whole Grangemouth community, following what could have been a potential disaster.

"It's been a great team effort from all concerned, including the unions and workforce, the management, Governments - and BP, who have made a material contribution to help defend and secure Scottish jobs and livelihoods.

"I am delighted that people have rallied round to protect these jobs, and now we can all agree that Grangemouth has an outstanding future.

"Clearly for many people across the communities of the Forth Valley, Wednesday was a day of despair - today is quite different, and is a day of great satisfaction that not only has a key part of Scotland's industrial infrastructure been saved but that people can look forward with confidence to a bright future.

"There will no doubt be continued debate and recrimination in some quarters about why the future of this facility went so close to the cliff edge.

"However, as First Minister, I prefer to stress the positives including the fact that so many people have gone the extra mile to secure Grangemouth's future."

Scottish Secretary Alistair Carmichael said: "This is the news that we all wanted.

'The staff and their families have been through a very stressful and uncertain time. They have been through a hell of a week and I hope they have a much better weekend as a result of today's announcement.

'They can look to the future with an optimism which was absent earlier in the week.

"This is the outcome we have worked towards and one which Scotland and Grangemouth deserve.

"There are undoubtedly lessons to be learned from this dispute but for now we should focus on the immediate success of securing the site's future.

"The joint talks at Ineos yesterday have been just one part of the UK Government's efforts to find a solution to this crisis.

"The UK guarantee for the new ethane facility is an important part of the discussions and the plant will be a key part of the company's plans for the future."

Unite's Scottish secretary, Pat Rafferty, said: "This decision is clearly very welcome. Relief will ring right round the Grangemouth community, and across Scotland today. Hundreds of jobs that would have been lost can now be saved and £300 million will be invested into the plant.

"Grangemouth is the powerhouse of the Scottish economy - it now has a fighting chance of upholding this crucial role into the future.

"Obviously today's news is tinged with sadness - decent men and women are being asked to make sacrifices to hold on to their jobs, but the clear wish of our members is that we work with the company to implement its proposals.

"Unite has worked tirelessly to save Grangemouth because we are totally committed to this plant and its incredible workforce. We will now sit down with Ineos to consult on the company's propsals."

Mr MacLean told a press conference: "We are very happy to announce that following a meeting with shareholders yesterday, Grangemouth petrochemicals will remain open, so that decision has been reversed.

"Ineos have confirmed that the £300 million that they are going to put into it will be available and we will start immediately with those projects again.

"We've also confirmed that with immediate effect, with due respect to all the safety and the timing, that all the assets will start as of today."

It is understood employees greeted the announcement with cheers when they were told the news.

Mr MacLean said the decision was taken following a meeting with shareholders last night in the wake of "a very clear message" from the employees and Unite.

He told the press conference: "This company has invested £1 billion into these assets over recent years and now they've confirmed they're going to invest another £300 million, so it's a huge investment and that investment was only rightly to be done if we had a long term sustainable base.

"What we've now done through this project is given the chemicals business another 15-20 years on the back of new raw materials and new contracts and significant investment."

Mr MacLean said no additional concessions had been demanded of the union by the firm.

"The union have simply agreed that there will be no strike action during this consultation, or around any discussions on the survival plan," he said.

"We will have that consultation period with the employees direct and we will also have that consultation period with the independents and the unions with a view to implementing the changes on the survival plan at the end of that period."

He did not rule out the possibility of some job losses but said any redundancies would be "very limited".

He said: "We would not dismiss that there would not be some redundancies, but having got the investment on the back of this announcement, redundancies will be very limited."

Mr MacLean said there was a "very large" cheer from the almost 800 employees who were at the meeting to hear the news.

He told the press conference: "We deliberately wanted to make the announcement firstly to the employees because it's the employees that have had a horrendous week with the announcements that came out earlier. It's been pretty traumatic for everybody, so it was quite right that we went in today and made that announcement to them first."

Asked whether an apology to Mr Ratcliffe would be demanded of the union, Mr MacLean said: "We've not asked for any kind of public apology. The most important thing about today has been about telling our people there's a future for this site and it's long-term sustainable."

On the future of contractors linked to operations at the site, he said: "What we've also announced today is that the projects that were stopped this week will commence, starting from today.

"We will need these contractors and agency staff to continue working on these projects to support investment in the survival plan."

On the company's relationship with the unions, Mr MacLean said: "Probably now is not the time to talk about that. We are where we are today and I think, if the unions had taken the stance that they'd taken in the last two days a week ago, we might never have been here and all the distress that has come to people on the site wouldn't have happened."

Scottish Trades Union Congress (STUC) general secretary Grahame Smith said in a statement: "Never in my 30 years at the STUC have I seen a union placed in such an impossible industrial relations position by a company. The approach of Ineos has flouted all of the norms of collective bargaining and the company effectively went on strike against its own workers, the local community and the people of Scotland.

"In that context Unite workers are to be congratulated for refusing to allow the plant to close, proving beyond doubt the strength and quality of their commitment to the site.

"The past week has proved beyond doubt that a plant of such critical importance to the local and Scottish economy requires the active support of elected governments and the fullest possible involvement of its workers and the wider community. We hope and trust that those who have worked so hard to keep the plant open will continue to co-operate to protect its future."

TreasuryChief Secretary Danny Alexander said: "I am very pleased that both parties have reached a deal, saving hundreds of jobs and giving families and all those involved with the plant security. We have been working hard to make sure that there is a future for the Grangemouth site, helping to preserve this key sector of the Scottish and UK economy.

"As we confirmed this week, we are in discussions with the plant over a Government guarantee for the new ethane facility, a key part of the company's plans for the future."

AA president Edmund King said: "The news that Grangemouth is likely to stay open is great news for employment, the economy and the longer term resilience of fuel production in the UK. We also applaud Scottish drivers for not panicking at the pumps during the dispute and the fuel industry for maintaining supplies.

"We trust this will bring more stability to the fuel supply chain and prices."

There was a cheer from workers when they were told at the meeting the plant had been saved.

John Convery, a reliability manager, said: "The last couple of days have been hellish, there's no other word for it. Myself and my colleagues, and all of our families, have been staring into the abyss.

"We'd just been paid but we didn't know if we were going to get another pay cheque again. We were told that the company we work for was going into liquidation and we didn't know if we were going to get any redundancy or what was going to happen to our pension, and everybody naturally assumed the worst.

"There was a lot of relief and a lot of emotion in there, we're relieved that we've still got a job.

"We were told that management have given the approval to start up the plant as of today, and on the petrochemicals side we'll start the process of coming back into production."

Michael Simpson, a contractor, said: "I'm not staff so I wasn't at the meeting but everyone is delighted with the news.

"A lot of contractors can struggle at this time of year so to get jobs back is a big sigh of relief for everyone and the community as well, the small businesses will be able to keep open.

"People have been down over the last few days because of what's been happening, which is obvious, but now things are hopefully going to get back to normal.

"It looks like the plants are starting to go back on line and that's a good start.

"This doesn't just affect Grangemouth, it affects everywhere outwith the town, contractors come from all over, haulage drivers, scaffolders, so keeping the work going is just a relief."

Engineer Paul Lindsay said: "People still weren't sure what was happening when we were going in to the meeting, but there was a cheer when he said that it's staying open.

"Obviously this week's been terrible thinking that you're out of a job, but now its back to normal and they said the plant's got a long-term future so hopefully that's a bit of security for all the folk that have been worrying this week."

Secretary of State for Energy and Climate Change Ed Davey said: "This is a very positive result. Grangemouth is important to the Scottish economy, the UK economy and most importantly to the local economy where 800 jobs have been saved and the local community has avoided a major blow. We can now look forward to a future of growth at Grangemouth.

"Many people in the UK and Scottish Governments have worked hard to make this happen, a clear sign of our commitment to Scotland, its economy and its people."