Question: Air Algérie Flight 5017  was operated by an airline headquartered in what country?

Context paragraphs:
Air Algérie Flight 702P: Air Algérie/Phoenix Flight 702P, named "Oasis" and registered 7T-VEE, was a Boeing 737 owned by Air Algérie and leased by Phoenix Aviation which crashed on 21 December 1994 near Coventry Airport, England.  All five on board were killed.

Air Algérie Flight 2208: Air Algérie Flight 2208 was a cargo flight between Algiers-Houari Boumediene Airport, Algiers, Algeria, and Frankfurt Airport, Germany.  On none }} , the Lockheed L-100 operating the flight crashed in Northern Italy as a result of an autopilot malfunction.  The aircraft struck the ground in a sparsely populated area after a very steep and rapid descent, narrowly avoiding crashing into a highly populated area.  The crew of three on board were killed in the accident; there were no passengers, nor were there injuries or property damage on the ground.

Air Costa: Air Costa was an Indian regional airline headquartered in Vijayawada and based out of Chennai Airport.  It was owned by Indian business company LEPL Group.  The airline commenced operations as a regional airline in October 2013 using two Embraer E-170 aircraft with the first flight taking off from Chennai on 16 October 2013.  The airline got a permit for pan India operations in October 2016.  The airline focused on connectivity between tier II and tier III cities in the country and invested as of 2015.  Air Costa operated 32 daily flights to nine destinations from its focus cities Chennai and Vijayawada as of 2015.  The airline had a maintenance center in Chennai.  On 28 February 2017, it suspended operations until further notice.

Swiftair: Swiftair S.A. is an airline headquartered in Madrid, Spain.  It operates scheduled and charter, passenger and cargo flights in Europe, North Africa and the Middle East.  Its main base is Madrid–Barajas Airport.

Mohamed Tayeb Benouis: Mohamed Tayeb Benouis (27 November 1948 – 9 August 2007) was an Algerian aviator and business executive who served as the director general of Air Algérie, the national airline of Algeria, from 2001 to 2007.

CAE Global Academy Phoenix: The CAE Oxford Aviation Academy Phoenix (formerly CAE Global Academy Phoenix and Sabena Airline Training Center) (CAE SATC) is an aviation school owned by Canadian group CAE (so part of CAE Oxford Aviation Academy) and located in Mesa on Falcon Field Airport.  Former subsidiary of Sabena Flight Academy, the school trains students including those of Air Algérie, SFA, Nationale Luchtvaartschool (NLS), Turkish Airlines, Shenzhen Airlines, EVA Air, British Airways and the cadet pilots of Japan Airlines.

Air Algérie Flight 6289: Air Algérie Flight 6289, was a scheduled domestic passenger flight, operated with a Boeing 737-200 which was departing from the southern Algerian city of Tamanrasset for Ghardaia and Algiers.  On 6 March 2003, the Boeing 737-200 stalled and crashed near the runway, killing all but one of the 102 people on board.

Gossi: On 24 July 2014, a McDonnell Douglas MD-83 aircraft flying Air Algérie Flight 5017 crashed southeast of Gossi with 116 people on board.  The flight had left Ouagadougou and was headed to Algiers.  Initial reports suggested a sandstorm might have been to blame.  Gossi was also the site of the capture of Mimi Ould Baba Ould El Mokhtar, believed to be responsible for a terrorist attack in Grand-Bassam, by French military forces.

Air Algérie: Air Algérie SpA (Arabic: الخطوط الجوية الجزائرية‎ ‎ , "al-Khuṭūṭu l-Jawwiyyatu l-Jazā’iriyyah" ; Berber: ) is the national airline of Algeria, with its head office in the Immeuble El-Djazair in Algiers.  With flights operating from Houari Boumedienne Airport, Air Algérie operates scheduled international services to 39 destinations in 28 countries in Europe, North America, Africa, Asia, and the Middle East, as well as domestic services to 32 airports.  The airline is a member of the International Air Transport Association, the Arab Air Carriers Organization, and of the African Airlines Association (AFRAA) since 1968.  s of 2013 , Air Algérie was 100% owned by the government of Algeria.

Air Algérie Flight 5017: Air Algérie Flight 5017 (AH5017/DAH5017) was a scheduled international passenger flight from Ouagadougou, Burkina Faso, to Algiers, Algeria, which crashed in Mali, near Gossi, on 24 July 2014.  The McDonnell Douglas MD-83 with 110 passengers and 6 crew on board, operated by Swiftair for Air Algérie, disappeared from radar about fifty minutes after take-off.  There were no survivors.

Supporting paragraphs: Air Algérie Flight 5017 Swiftair
Answer: Spain