Piedmont was inhabited in early historic times by Celtic-Ligurian tribes such as the Taurini and the Salassi. They were later submitted by the Romans (c. 220 BC), who founded several colonies there including Augusta Taurinorum (Turin) and Eporedia (Ivrea). After the fall of the Western Roman Empire, the region was repeatedly invaded by the Burgundians, the Goths (5th century), Byzantines, Lombards (6th century), Franks (773). In the 9th-10th centuries there were further incursions by the Magyars and Saracens. At the time Piedmont, as part of the Kingdom of Italy within the Holy Roman Empire, was subdivided into several marks and counties.
In 1046, Oddo of Savoy added Piedmont to their main territory of Savoy, with a capital at Chambéry (now in France). Other areas remained independent, such as the powerful communes of Asti and Alessandria and the marquisates of Saluzzo and Montferrat. The County of Savoy was elevated to a duchy in 1416, and Duke Emanuele Filiberto moved the seat to Turin in 1563. In 1720, the Duke of Savoy became King of Sardinia, founding what evolved into the Kingdom of Sardinia or Sardinia-Piedmont and increasing Turin's importance as a European capital.
The title "King" first appears as an informal praise of Constantine I of Logudoro, though his successor Gonario II employed it in official documents. The first crowned "King of Sardinia" or rex Sardiniae was the judge Barisone II of Arborea. Frederick Barbarossa, who invested him as such in 1164, was forced to reverse this decision and regrant Sardinia to the Archdiocese of Pisa the next year. Barisone's successors, Hugh I and Peter I, continued to claim the title, but it never had any meaning. Briefly after succeeding to the Giudicato of Gallura, Enzo, son of the Emperor Frederick II, was installed as king, but was captured and never succeeded in making the kingship hereditary.
In 1297, Pope Boniface VIII, intervening between the Houses of Anjou and Aragon, established on paper a regnum Sardiniae et Corsicae that would be a fief of the Papacy. Then the Pope offered his newly-invented fief to the Valencian James II the Just, king of the Crown of Aragon (a confederation made up of the kingdoms of Aragon and Valencia, and the Counties of Barcelona, Pallars Sobirà and Urgell), promising him papal support should he wish to conquer Pisan Sardinia in exchange for Sicily. In 1323 James II formed an alliance with Hugh II of Arborea and, following a military campaign which lasted a year or so, occupied the Pisan territories of Cagliari and Gallura along with the city of Sassari, claiming the territory as the Kingdom of Sardinia and Corsica. In 1353 Aragon made war on Arborea, then fought with its leader Marianus IV of Arborea,of the Cappai de Bas family, but did not reduce the last of the autochthonous giudicati until 1410. The Kingdom of Sardinia and Corsica retained its separate character as part of the Crown of Aragon and was not merely incorporated into the Kingdom of Aragon. At the time of his struggles with Arborea, Peter IV of Aragon granted an autonomous legislature to the Kingdom, which had one of Europe's most advanced legal traditions. The Kingdom was governed in the king's name by a viceroy. When in 1409, Martí the younger, king of Sicily and heir to Aragon, defeated the last Sardinian giudicato but then died in Cagliari of malaria, without issue, Sardinia passed with the Crown of Aragon to a united Spain. Corsica, which had never been conquered, was dropped from the formal title.
In 1792 Piedmont-Sardinia joined the First Coalition against the French First Republic, but was beaten in 1796 by Napoleon and forced to conclude the disadvantageous Treaty of Paris (1796), giving the French army free passage through Piedmont. On December 6, 1798 Joubert occupied Turin and forced Charles Emmanuel IV to abdicate and leave for the island of Sardinia. The provisionary government votes to unite Piedmont with France. In 1799 the Austro-Russians briefly occupy the city, but with the Battle of Marengo (1800), the French regain control. The island of Sardinia stayed out of the reach of the French for the rest of the war.
In 1814 the kingdom was restored and enlarged with the addition of the former Republic of Genoa, now a duchy, and it served as a buffer state against France. This was confirmed by the Congress of Vienna. In the reaction after Napoleon, the country was ruled by conservative monarchs: Victor Emmanuel I (1802-21), Charles Felix (1802-21) and Charles Albert (1821-49), who fought at the head of a contingent of his own troops at the Battle of Trocadero, which set the reactionary Ferdinand VII on the Spanish throne. The Kingdom of Sardinia industrialized from 1830 onward. A constitution, the Statuto Albertino, was enacted in the year of revolutions, 1848, under liberal pressure, and under the same pressure war was declared on Austria. After initial success the war took a turn for the worse and the Kingdom of Sardinia lost.
Like all of Italy, the Kingdom of Sardinia was troubled with political instability, under alternating governments. After a very short and disastrous second war with Austria, Charles Albert abdicated on March 23, 1849, in favour of his son Victor Emmanuel II.
In 1850 a liberal ministry under Count Camillo Benso di Cavour was installed, and the Kingdom of Sardinia became the engine driving the Italian Unification. The Kingdom of Sardinia (Piedmont) took part in the Crimean War, allied with Ottoman Empire, Britain and France, and fighting against Russia.
In 1859 France sided with the Kingdom of Sardinia in a war against Austria, the Austro-Sardinian War. Napoleon III didn't keep his promises to Cavour to fight until all of the Kingdom of Lombardy-Venetia had been conquered. Following the bloody battles of Magenta and Solferino, both Sardinian/French victories, Napoleon thought the war too costly to continue and made a separate peace behind Cavour's back in which only Lombardy would be ceded. Due to the Austrian government's refusal to cede any lands to the Kingdom of Sardinia, they agreed to cede Lombardy to Napoleon who in turn then ceded the territory to the Kingdom of Sardinia to avoid 'embarrassing' the defeated Austrians.