Although Spain remained neutral during World War I, despite suffering considerable economic losses to German submarines, she was militarily active elsewhere during the early part of the 20th century, attempting to strengthen her position in North Africa. Despite successes in the late 19th century, the first Rif War (1893–4) around Melilla had also shown the potential weakness of the Spanish position along the coast. The second Rif War (1909–10) was initially a fiasco for the under-equipped and undertrained Spanish, until heavy artillery was brought in; in the aftermath of the war, Spain began to raise units of local Regulares. The third Rif War (1920–1926) also began badly for the Spanish, especially after the disaster of Annual (1921), resulting in various changes to the Spanish approach. Working in alliance with French forces in the region, Spain created the Spanish Legion along similar lines to the French Foreign Legion to provide additional experienced forces. Spain also became the first country to deploy chemical weapons by air, dropping mustard gas from aircraft.