In 862, Baldwin Bras-de-Fer [Iron Arm], a son-in-law of Emperor Charles II, became the first count of Flanders. In the divisions (9th cent.) of the Carolingian empire, Flanders became a fief of the French crown, but its powerful counts enjoyed virtual independence. They extended (11th cent.) their domains to the east; these additions, being held in fief to the Holy Roman Empire, became known as Imperial Flanders, in contrast to Crown Flanders, held from the French kings. In the 12th cent. the direct line of counts died out, and in 1191 the counts of Hainaut (with which Flanders previously had been briefly united) also became counts of Flanders.
The struggle for the succession to Flanders in the 12th cent. resulted in the loss of Artois and other districts and towns in W and S Flanders to the French crown. At the same time, the Flemish cities—among which Ghent, Bruges, Ypres, and Kortrijk were foremost—gained vast privileges and liberties (see commune). Their prosperity and the prosperity of Flanders as a whole depended on the growing cloth industry, which had been introduced in the 10th cent., and on the transit trade at such major ports as Bruges (later superseded by Antwerp) and Ghent. By the 13th cent. the Flemish cloth industry was the foremost in Europe, and it has still retained much of its importance.
Flanders had a turbulent history in the 13th and 14th cent. due to social, economic, and political tensions. One result of the intensive industrialization of the cities was a struggle between the guild workers and the patricians. This struggle was reflected in the political rivalry of the Leliaerts (supporters of the French kings, named for the fleur-de-lis on the French arms), who were backed by the patricians, and the Clauwaerts (supporters of the counts of Flanders, named for the lion's claws in the counts' shield), who represented the lower classes. In addition, there was a long-standing rivalry among the cities, which often led to open warfare.
Flanders was weakened by the departure of its count, Baldwin IX, on the Fourth Crusade, during which he was proclaimed (1204) emperor of Constantinople as Baldwin I. Baldwin's absence was exploited by Philip II of France to strengthen his influence in Flanders; the Flemings were aided by John of England and Emperor Otto IV, but were defeated by Philip at Bouvines (1214). In 1297, Guy of Dampierre, count of Flanders, allied himself with Edward I of England against Philip IV of France; Philip, with the help of the Leliaerts, overran Flanders and imprisoned Guy (1300). Only two years later the Clauwaerts seized power; the French were massacred in the Matins of Bruges and were forcefully expelled in the Battle of the Spurs (1302).
The accession (1322) of the pro-French Louis of Nevers as count of Flanders threw the country into a civil war in which Bruges and Ypres sided against (but Ghent sided with) the count. The pro-French party emerged victorious. When Edward III of England, about to embark on what was to become the Hundred Years War with France, stopped wool exports from England to Flanders, the Flemish cloth industry faced ruin. Aware of the danger, the Flemings united under the leadership of Ghent, where Jacob van Artevelde was given dictatorial powers in 1337, and allied themselves with England, taking part in Edward's great naval victory at Sluis (1340). After Artevelde's death (1345), Louis de Maële, son of Louis of Nevers, regained control over Flanders and sought to balance the influences of England and France. In 1381, however, the weavers of Ghent rebelled once more, this time under Philip van Artevelde. The weavers captured Bruges but were defeated (1382) by a French army at Roosebeke (now Westrozebeke).
Louis de Maële's son-in-law, Duke Philip the Bold of Burgundy, succeeded to Flanders on Louis's death (1384) and in 1385 subdued Ghent. Under the Burgundian dynasty (see Burgundy), Flemish commerce and art flourished, but Flanders lost its independence; the Burgundians and (after 1477) the Hapsburgs kept a firm grip on Flanders, which was a major source of income. The cloth industry was in decline, and the political rights of the cities, although asserted in many revolts, were curtailed. On the death (1477) of Charles the Bold, duke of Burgundy, his heir, Mary of Burgundy, restored the Flemish liberties in the Great Privilege. Her son by Archduke Maximilian (later Emperor Maximilian I), Philip of Burgundy (later Philip I of Castile), succeeded on Mary's death in 1482, but the burghers kept him a virtual prisoner in Ghent until 1485.
In 1506, Flanders came under the Spanish line of the house of Hapsburg through Philip's wife Joanna. Flanders joined (1576) in the revolt of the Netherlands against Philip II of Spain, but by 1584 the Spanish under Alessandro Farnese had recovered the county. It continued under Spanish rule until 1714, when the Peace of Utrecht awarded it to Austria (see Netherlands, Austrian and Spanish). Parts of W Flanders, including Lille, were annexed (1668–78) to France by Louis XIV and became known as French Flanders (see Flanders, French). Austria ceded the remainder of Flanders to France in the Treaty of Campo Formio (1797), but the Congress of Vienna awarded (1815) the former Austrian Flanders to the Netherlands. When Belgium gained (1830) independence, its part of Flanders was divided into the provinces of East Flanders and West Flanders.
Flanders's strategic location has made it a major battleground since the Middle Ages. In World War I, there was continuous fighting in French Flanders and in West Flanders. In World War II, the battle of Flanders began with the German invasion (May 10, 1940) of the Low Countries and ended with the surrender of the Belgian army and the evacuation of the British at Dunkirk (May 26–June 4, 1940).