Spain's military has taken over the country's air traffic control after civilian staff called in sick en masse.
The move, ordered by the government, comes after several airports across Spain were shut after traffic controllers' unauthorised walkout.
Most of Spain's airspace remains closed and tens of thousands of travellers have been stranded.
The controllers are involved in a dispute with Spanish airport authority Aena over hours and conditions.
National carrier Iberia has cancelled all flights from Spanish airports until 1000 GMT on Saturday.
Late on Friday evening, Spain's Deputy Prime Minister Alfredo Perez Rubalcaba said the military had taken full control of all air traffic over Spain after workers refused to called off the unsanctioned strike.
Mr Rubalcaba later warned that if the action continued on Saturday, the government would declare a state of emergency, forcing air traffic controllers to return to work or face criminal prosecution.
"If a controller does not show up to his work place he will be placed immediately in custody accused of a crime which could mean serious prison sentences," he said.
Aena estimates that the strike action could affect the travel plans of up to 250,000 people.
The organisation's chief, Juan Ignacio Lema, said the strike was "intolerable", and told the controllers to "stop blackmailing the Spanish people".
Spanish Transport Minister Jose Blanco has also condemned the strike, saying those involved were "using citizens as hostages".
The controllers' action began at 1700 local time (1600 GMT), resulting in the shutdown of about 90% of Spain's airspace, with the exception of the southern region of Andalucia.
They were already involved in a dispute about their working hours, but were further angered by austerity measures passed by the government on Friday which would partially privatise the country's airport.
"We have reached our limit mentally with the new decree approved this morning obliging us to work more hours," said Jorge Ontiveros, a spokesman for the Syndicate Union of Air Controllers.
"We took the decision individually, which then spread to other colleagues who stopped work because they cannot carry on like this. In this situation we cannot control planes."
The BBC's Sarah Rainsford in Madrid says the action has disrupted air traffic across the country at the start of a holiday weekend.
Madrid's Barajas airport was one of the first to be affected, along with airports on Majorca, Ibiza and Menorca in the Balearic Islands.
Barajas is the busiest airport in Spain - a hub for international and national flights, and the base for the national carrier Iberia.
Hundreds of national and international flights have been cancelled across the country, leaving angry passengers left stranded in airports.
Some were left stranded on runways as their planes had to turn back. Others had to travel by bus to regional destinations.
"All flights are blocked, there's a huge lot of people here, sitting around everywhere. Right now everyone is calm, but we don't know what's happening," said one traveller at Barajas airport.
"The captain came out to say Spanish airspace had suddenly shut, with no prior warning," another passenger stuck in a plane at Palma told Spanish radio.
One woman at Barajas airport said it was "a disgrace". "How can a group of people be so selfish as to wreck the plans of so many people?"
Late on Friday, Aena said flights from Barcelona airport were "resuming progressively" after about half the controllers arrived for their evening shift.
However, flights from the airport to Madrid and the Balearic islands were still suspended, it said in a statement.