The Foreign Legion was established in 1831 by King Louis Philippe I to consolidate all foreign corps fighting under French colors, which included, among others, the Swiss Guards, the Swiss regiments of the Royal Guard, and the Hohenlohe Regiment. After its creation, the Legion participated in the further recruitment of foreign nationals into French military service.

Initially, the Legion was heavily involved in the French conquest of Algeria (1830–1849) and the First Carlist War (1833–1840). After the Legion was essentially abandoned by the French government during the First Carlist War, a second Legion was formed in 1836. This Legion would become the modern Foreign Legion and would participate in the expansion and maintenance of the French colonial empire during the 19th and 20th centuries.

Foreign nationals in the service of France Middle Ages and Ancien Régime There is evidence of the French monarchy hiring foreign soldiers since before the Bourbon Restoration.

In 1346, Philip VI of France deployed 15,000 Genovese soldiers at the Battle of Crécy. The 13th century and the 14th century also saw large free companies of Scottish, Castillan, Savoyard, Swiss, and Dutch soldiers serving under various chiefs and princes.

During the reign of Louis XI, 20–30% of the French army consisted of non-French soldiers. Additionally, Louis XI employed a Garde Écossaise (Scottish Guard) and up to 6000 Swiss guards in 1480.

Francis I created the ., formed mostly from foreign infantry corps.

During the Seven Years' War, France mustered 32 foreign regiments: twelve German units, ten Swiss, seven Irish, two Italian and one Scottish.

During the French Revolution, the National Legislative Assembly allowed the use of foreign soldiers and created foreign volunteer units, such as the . In its July 26, 1792 decree, the Assembly stated that "if the enemies' kingdoms would deploy numerous armies against the free people, it is important for these free people to admit into their ranks all the men whose sublime impulse calls to fight for the sacred cause of Liberty." Accordingly, the Légion Franche Etrangère (Free Foreign Legion), a precursor to the modern-day Foreign Legion, was created on August 1, 1792. Germanic, , Batavian, and Polish Legions were also formed. During this period, 42,000 out of a total of 146,000 soldiers in the French army were non-French nationals.

First French Empire The conquests of the First French Empire created a large demand for foreign troops, and the proportion of non-French soldiers reached record levels; up to one-sixth of total soldiers actively engaged in combat were foreign troops. After his rise to power, Napoleon Bonaparte initially recruited 4,000 Swiss troops. That number swelled to 90,000 by the end of his reign, many of whom were incorporated in the .

In 1805, the and the were formed from Russian and Austrian prisoners. These two regiments were later renamed the 1st Foreign Regiment and 2nd Foreign Regiment, respectively, and were dissolved in 1814. The (Légion du Midi), created in 1803, was composed of former French soldiers and recruits from the French departments of Italy. Napoleon's forces would also include the Spanish Pioneers, the , the , the Egyptian Mamluks, and the Portuguese Legion. Between 1806 and 1814, there were 60 foreign units commanded by 136 generals. Many of these were European volunteers; conscripts came only from regions annexed by the Empire. It is estimated that out of the 400,000 soldiers who initially participated in the French Invasion of Russia in 1812, only 120,000 were French nationals. During his return to France in the Hundred Days, Napoleon was at the head of eight foreign regiments.

Bourbon Restoration In 1815, under Louis XVIII, the Royal Foreign Legion consisted of six regiments of 14,000 Swiss soldiers and four regiments of Portuguese and Spanish soldiers.

Creation of the Foreign Legion Causes The creation of the Legion was largely due to the purge in the army following the July Revolution of 1830. After being installed as a constitutional monarch, King Louis Philippe I required a way to keep dangerous elements of his regular army busy, regardless of whether they were French or foreign nationals. There were also concerns about certain soldiers being foreign insurrectionists or volunteer fighters who had joined the army in the hope of continuing the 1789 Revolution. The Legion came as a solution for those who would not conform to the governing agenda: a way for the French state to contend with the most restless soldiers and keep them under control.

Additionally, the French Invasion of Algiers in 1830 was very unpopular domestically and contributed to low army morale. Louis Philippe I was a pacifist and did not want to defy public opinion by using the French military, nor did he wish to upset his military command by endangering French lives. To overcome these problems, the idea of a Foreign Legion, solely consisting of foreign troops recruited for a specific purpose and organised in a dedicated corps, was born.

Creation by Royal Ordinance The Foreign Legion was created by Royal Ordinance on March 9, 1831. The ordinance had nine articles:

A challenging start

Though the former Swiss regiments and the Hohenloe regiment formed a professional nucleus within the Legion, the experience of recruits varied greatly. Initially, the Legion attracted foreign nationals from all walks of life and succeeded in its goal of diminishing the number of potential revolutionaries. However, not all who enlisted did so out of the expected, voluntary motives. For example, adventurers enlisted hoping to be sent overseas, especially to Africa, which remained relatively unexplored at the time. The resulting Legion was a motley crew with a wide range of national backgrounds and political orientations. Inevitably, inactivity while waiting for assignments and the nationalism harbored by certain Legionnaires caused internal tensions, soon exposing the lack of cohesion within the Legion.

To compound the Legion's problems, officers and non-commissioned officers were also needed, but those of the former Imperial Army were too old and not adapted to the changing nature of warfare. Newly recruited foreign officers were unfamiliar with the French language and sometimes came from military branches other than the army. Amidst the confusion, insubordination and desertion were common and punishments were harsh. Tensions reached a height in mid-May, when the National Guard was called upon to prevent a possible rebellion. 20 soldiers were arrested.

Despite these complications, less than six months after the proclamation of the royal ordinance, five battalions had been created, each with eight combat companies.

+ Nationalities by battalion nationalities 1st through 3rd Swiss and former Hohenlohe Regiment or Germans 4th Spanish 5th Sardinians and Italians 6th Belgians and Dutch

Early Deployment Starting in August 1831, the 1st, 2nd, 3rd and 5th battalions were deployed to Algeria to aid in the ongoing French conquest. This force consisted of 2,669 Legionnaires and sous-officiers (non-commissioned officers) commanded by 78 officers.

The Legion's first task was the construction of earthworks, which was the birth of the Legion's reputation as pioneers. The Legion would also build the Casbah route in the region of the , near Algiers, and participated in the construction of many forts, including the Fort-de-l'Eau (Water Fort). Conditions were harsh; between 1831 and 1835, 3,200 men were killed or discharged as a result of fevers, dysentery and cholera.

Baptism by fire

On April 7, 1832, 300 men of the 3rd battalion began to secure the area surrounding Algiers and engaged in combat at Maison Carré named including the massacre of El Ouffia. On May 23, a detachment was destroyed, resulting in 26 fatalities. Altogether, the Legion's involvement in the conquest of Algeria cost the Legion 27 officers, 61 sous-officiers and 756 Legionnaires.

That same year, a flag arrived from France, offered by Ferdinand Philippe, Duke of Orléans. Inscribed on the flag was: Le Roi des Français à la Légion étrangère ("The King of the French in the French Foreign Legion"). From then on, the troop became more widely-known and distinguished within the French military.

Still in Algeria, the Legion fought at Sidi Chabal in November 1832, where the Spanish battalion distinguished itself in battle. In March 1833, Legionnaires fought at Ouled Yacoub and Oule Attia, against Emir Emir Abdelkader and the tribes of the Sig.

The Legion won a victory at Arzew on June 5 and took Mostaganem on July 27, 1833.

1835 was marked by fighting at Moulay Ismael in Battle of Macta, which cost the lives of a hundred Legionnaires.

Spain and the end of the old Legion Goodwill to Spain

On June 28, 1843, British, Portuguese and French ambassadors to Spain signed a treaty with the Spanish government, affirming their support for Maria Christina and her daughter Queen Isabella II against the Carlist pretender, the Infante Carlos. France was reluctant to interfere in Spanish affairs and risk compromising European peace, and so did not want to send the regular French Army to aid Spain. In the end, sending the Foreign Legion was seen to be the most justifiable course of French involvement.

On January 28, 1835, under pressure from Adolphe Thiers, Minister of Interior, the Legion was ceded to Queen Isabella II. On June 29, a royal ordinance stipulated that the entirety of the Foreign Legion (including the sick, imprisoned, and those on leave) was no longer part of the French Army. Severe sanctions for insubordination were imposed on soldiers who attempted to resist the change.

On July 30, 4,021 sous-officiers and Legionnaires commanded by 123 officers embarked on navy ships towards Spain.

During a stopover at the Balearic Islands, the battalions were reorganized so that all nationalities would be mixed to improve unit cohesiveness.

The fighting The Legion in Spain became the French Auxiliary Division and their commander, Colonel Joseph Bernelle, became Maréchal de camp of the Spanish Armies. After several skirmishes against Carlists in Navarre and Aragon, the Legion entered Pamplona on February 5, 1836, to encircle and isolate the province.

The Legion often fought alone and, as a result, slowly became more autonomous. Bernelle supplemented his troops with three squadrons of lancers, a howitzer battery for support, and a medical company, marking the beginning of Foreign Legion in its modern form.

As the fighting progressed, the Legion's losses mounted. On April 15, 1836, 117 had been killed, 380 had died of wounds or disease, and 83 had deserted. At Tirapequi on April 26, 500 Legionnaires repelled 3,500 Carlists at the cost of 90 dead. Later, at Zubiri on August 1, the Legion alone killed 1,200 Carlists in one battle.

The Legion abandoned In Spain, the Legion became increasingly isolated, only receiving sporadic reinforcements. Conditions were poor; equipment and supplies were insufficient, pay was irregular, and decorations and promotions were rare. The government in Paris turned a deaf ear to soldiers' concerns; Adolphe Thiers, now Prime Minister, refused them aid, saying that the Legion had been handed in full to Spain. King Louis Philippe I was similarly reluctant and refused to send reinforcements from France's regular army. Resources and troops were needed for the more pressing conquest of Algeria—sending the French army into Spain would further divide and fatigue French troops. Furthermore, the King wanted to avoid France from becoming further entrenched in the Spanish war. Dissatisfied with his government's response, Bernelle resigned and returned to France.

Misery and wandering