The company had warned with the petrochemical plant losing £10 million a month, its proposed survival plan was its only option available, so when Unite union rejected it, it had no option but to announce its closure.
But the plant's chairman Calum MacLean said the union's dramatic U-turn to accept the management's proposed changes to pay and pensions meant the Grangemouth complex now had "an excellent future". Some 800 direct jobs and 2000 contractor jobs have been saved.
"Ineos have confirmed the £300m they are going to put into it will be available and we will start immediately with those projects again," he said.
The money will be used to fund losses and the building of a gas terminal to bring in shale gas from America.
As news of a reprieve broke, there was a collective cheer from the workers and a collective sigh of relief from politicians north and south of the border.
"This news is a tremendous fillip for the workforce and the whole Grangemouth community following what could have been a potential disaster," Alex Salmond said.
"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."
He admitted that for many people across the communities of the Forth Valley, Wednesday, the day of the closure announcement, had been one of despair. But yesterday was quite different.
"It 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," he added.
Alistair Carmichael, the Scottish Secretary who was also involved in talks with management and the unions, said the workers could now look to the future with optimism after a deeply uncertain time.
"This is the outcome we have worked towards and one which Scotland and Grangemouth deserve," he said. "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."
Pat Rafferty, Unite's Scottish leader, also welcomed the decision, saying: "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 £300m will be invested into the plant."
He said the news was tinged with sadness given that workers were being asked to make big sacrifices so they could hold onto their jobs.
But Mr Rafferty made clear it had been the wish of union members the Unite leadership and the company worked together to make sure the plant had a fighting chance of continuing as the "powerhouse of Scotland's economy" into the future.
AA president Edmund King described the rescue as great news for employment, the economy and the longer term resilience of fuel production in the UK.
Lena Wilson, chief executive of Scottish Enterprise said the decision would save hundreds of Scottish jobs and safeguard the future of the Grangemouth site. However Scottish Trades Union Congress (STUC) general secretary Grahame Smith criticised the way Ineos dealt with the union. He said: "Never in my 30 years at the STUC have I seen a union placed in such an impossible industrial relations position by a company."