The first human settlements in the area date to the
Neolithic age, while the first historically known people living here were the
Celtiberians, who lived in
Bergidum, later known as
Bergidum Flavium after the
Roman conquest. In the Middle Ages, the town is first mentioned in 791. The origin of the modern town is connected to the
Way of St. James, as a rest place for the pilgrims on their way to
Santiago de Compostela beginning in the 9th century. In the
Codex Calixtinus Villafranca is mentioned as an intermediate stage between
Rabornal and
Triacastela. In 1070, during the reign of
Alfonso VI of León, a
Cluniac monastery was founded here to cultivate wine, and a borough of French pilgrims rose around it, from which the town's name (meaning "French Town") stems. Numerous hotels and hospitals were established in the town for the pilgrims. In the late 12th century
Alfonso VII of León gave the lordship of Villafranca to his sister Sancha. Later it went to Urraca, wife of King
Ferdinand II and then to
Teresa, wife of
Alfonso IX, and then to numerous other noble people. In 1486 the lordship became a marquisate assigned to Luis Pimentel y Pacego: his daughter married
Pedro Álvarez de Toledo, whose family thenceforth held the marquisate for centuries. In 1619 saint
Lawrence of Brindisi was brought here after his death in
Lisbon and buried in the Monastery of the Assumption, which still contains his spoils. During the
Peninsular War Villafranca was the headquarters of the Galician army and was sacked three times by the English troops, and was later occupied by the
French troops. The Spanish general
Antonio Filangieri died here. The town was freed in 1810. ==Main sights==