LONDON -- The killing of foreign workers in the Algerian desert threatens production from North Africa's largest oil and gas industry, the main source of revenue for a country that avoided unrest when the Arab Spring swept away governments across the region.The bloody action to end a hostage-taking by Islamist rebels at a BP-operated natural gas field supplying 12 percent of Algeria's output will make foreign explorers wary about working in the country, said Ahmed Amdimi, a professor of political science at the University of Algiers. On Saturday, Spain's Cia. Espanola de Petroleos, Statoil ASA and BP became the first oil companies to evacuate workers."The oil and gas installations were even more secure than the army barracks; they were oases in an unsafe country," said James Le Sueur, a history professor at the University of Nebraska in Lincoln and author of Algeria Since 1989: Between Terrorism and Democracy. "That they finally got to them indicates a very substantial threat."Algeria is the third-largest gas supplier to the 27-nation European Union, piping fuel under the Mediterranean. Energy accounts for 70 percent of tax revenue and 98 percent of exports, according to the African Development Bank. Worsening security in the Sahara Desert may slow drilling by producers including France's Total, Italy's Eni and Statoil."Algeria lives off oil and gas," Amdimi said. "To strike against that is to strike against Algeria as a whole. If other operations take place, this will have a very dangerous effect on the Algerian economy."It also produces about 1.2 million barrels of oil a day.BP said in a statement that it plans to fly some nonessential personnel out of Algeria. Statoil, BP's partner at the Ain Amenas field, will also bring staff members out. Cepsa evacuated foreign employees from two sites within 155 miles of Ain Amenas.Anadarko Petroleum and ConocoPhillips, two U.S. oil and natural gas producers with assets in Algeria, said they're watching developments there. Production from Algeria accounted for about 8 percent of Anadarko's output in the third quarter, and the company is a partner in the El Merk development that's expected to ramp up, according to Alembic Global Advisors.Other operators in Algeria including Total and Spain's Repsol SA declined to comment on the security situation."Given the importance of Algerian exports to Europe, and particularly Italy, the major players are vigilant," said Nicolo Sartori, energy and defense analyst at Rome's Institute of International Affairs. "If an internal conflict should erupt in Algeria, then we'd be looking at a different scenario that would pose a serious risk to gas supply."While Algeria, a democratic republic where the army remains a powerful political force, largely avoided the unrest that started two years ago in Tunisia and overthrew regimes in Egypt, Tunisia and Libya, this week's attack may signal the country is becoming embroiled in a regional conflict with Islamist fighters allied with al Qaeda.France sent troops to Mali, Algeria's southern neighbor, to support the government in a conflict with rebels in its northern, Saharan region.The kidnappings Wednesday at Ain Amenas were apparently a response to President Francois Hollande's intervention.A worsening conflict in the Sahara also threatens Libya, where oil and gas production only recently recovered from the conflict that overthrew the regime of Moammar Gadhafi in 2011, according to estimates compiled by Bloomberg.Libya has several major oil and gas installations close to the Algerian border, including the Wafa gas treatment plant 340 miles southwest of Tripoli, and the El Feel, or Elephant, field, jointly run by Libya's National Oil Co. and Italy's Eni.The inadequacy of government security in Libya was underlined June 5 when a militia complaining about an alleged kidnapping occupied and closed the Tripoli airport by driving armed jeeps past perimeter security and blocking the runways."Libya seems to be more at risk, simply because the government doesn't have the same strength as the Algerian authorities," Sartori said.The closure of Ain Amenas, where Sonatrach and Statoil are the other partners, will compound a seven-year decline in Algerian exports driven by higher domestic energy demand, said Thierry Bros, a gas market analyst at France's Societe Generale. The field accounts for 2 percent of Europe's gas imports.