But unions at the plant denounced what they described as a betrayal by the government, saying they had backed down on a threat to nationalize, and wanted to know what had happened to a possible buyer mentioned by one minister.
Ayrault said ArcelorMittal had committed to invest at least 180 million euros ($234 million) over the next five years in the endangered Florange site in northeastern France.
The company had also reaffirmed its commitment to the region and the money invested in Florange would not be at the expense of its other sites it ran in France, he added.
The government has not retained its proposed "temporary nationalization" given the commitments ArcelorMittal had made, he added.
The company had closed the two blast furnaces as the demand for steel slumped.
Friday's agreement came after three days of tense negotiations and within hours of a deadline set by the world's top world steelmaker for a deal.
ArcelorMittal had insisted the government find a buyer for the two blast furnaces at the Florange site, in the northeastern Lorraine region, by Saturday.
At stake were the 650 jobs there.
Ayrault, reading from a statement, said the two blast furnaces ArcelorMittal had closed would be left intact for now, until EU financing was
confirmed for an existing carbon-capture project.
Both ArcelorMittal and France are stakeholders in this project.
"The government has thus shown the capacity for state intervention to bring about positive solutions for jobs, investments and future industrial projects" in a troubled sector, he added.
"These undertakings of ArcelorMittal are unconditional," he added.
"The government will see that they are scrupulously respected."
But a spokesman for the CFDT union at the plant quickly denounced the deal.
"We have the feeling we have once again been betrayed," said Edouard Martin at the Florange plant, a few minutes after the prime minister's statement.
"We don't trust Mittal at all," he added, referring to tycoon Lakshmi
Mittal, the steel giant's owner.
Martin called for direct talks with both the government and company management.
A source inside the office of French President Francois Hollande said they still had the means to apply pressure on the tycoon, should that be necessary.
"If (Mittal) acts like someone who doesn't respect his word there are ways to apply pressure," the Elysee official said Friday.
"We are keeping the revolver on the table," he added.
But CFDT secretary general Dominique Gillier wanted to know why the prime minister had made no mention of a possible buyer that his Industrial Renewal Minister Arnaud Montebourg had mentioned.
Hours earlier Montebourg, meeting with workers from the plant camped outside his office, had told them the nationalisation option was "not a false hope but a solution that is serious, credible and lasting."
ArcelorMittal however had made it clear that any nationalisation of the plant would cast doubt on the future of all its operations in France, where it employs 20,000 people.
Montebourg had already said there were interested investors, but only for the entire site, with a nationalisation as a means to sell the plant to another firm.
The world's largest steelmaker, which had always wanted to keep operating the rest of the Florange site, had given the government until Saturday to find a new investor willing to take over the furnaces.
On Wednesday, Montebourg had said one industrialist had been interested in pouring 400 million euros into the plant.
In the end though, there was no buy-out and no nationalization.
A source at the prime minister's office said Friday there were no "credible, firm" takers for the site.
Montebourg is widely regarded as a loose cannon inside the government.
As the dispute over the threatened plant came to a head on Monday, he accused the steel group of blackmailing France.
They were "no longer welcome in France", he added, sparking outrage in business circles.
Hollande's government has been caught in a bind over the plant, between his pledge to protect jobs and improve the competitiveness of French industry.