|Under Charles V, Holy Roman Emperor, and king of Spain, the region was part of the Seventeen Provinces of the Netherlands, which also included most of present-day Belgium, Luxembourg, and some land of France and Germany. 1568 saw the start of the Eighty Years’ War between the provinces and Spain. In 1579, the northern half of the Seventeen Provinces formed the Union of Utrecht, a treaty in which they promised to support each other in their defense against the Spanish army. The Union of Utrecht is seen as the foundation of the modern Netherlands. In 1581 the northern provinces adopted the Oath of Abjuration, the declaration of independence in which the provinces officially deposed Philip II. Philip II the son of Charles V, was not prepared to let them go easily and war continued until 1648 when Spain under King Philip IV finally recognised Dutch independence in the Treaty of Münster.
Dutch Republic 1581-1795
Since their independence from Phillip II in 1581 the provinces formed the Republic of the Seven United Netherlands. The republic was a confederation of the provinces Holland, Zeeland, Groningen, Friesland, Utrecht, Overijssel and Gelre. All these provinces were autonomous and had their own government, the “States of the Province”. The States-General, the confederal government, were seated in The Hague and consisted of representatives from each of the seven provinces. The very thinly populated region of Drenthe, mainly consisting of poor peatland, was part of the Republic too, although Drenthe was not considered one of the provinces. Drenthe had its own States but the landdrost of Drenthe was appointed by the States-General.
The Republic occupied a number of so-called Generality Lands (Generaliteitslanden in Dutch). These territories were governed directly by the States-General, so they did not have a government of their own and they did not have representatives in the States-General. Most of these territories were occupied during the Eighty Years’ War. They were mainly Roman Catholic and they were used as a buffer zone between the Republic and the Southern Netherlands.
The Dutch grew to become one of the major seafaring and economic powers of the 17th century during the period of the Republic of the Seven United Netherlands. In the so-called Dutch Golden Age, colonies and trading posts were established all over the globe.
Many economic historians regard the Netherlands as the first thoroughly capitalist country in the world. In early modern Europe it featured the wealthiest trading city (Amsterdam) and the first full-time stock exchange. The inventiveness of the traders led to insurance and retirement funds as well as such less benign phenomena as the boom-bust cycle, the world’s first asset-inflation bubble, the tulip mania of 1636–1637, and according to Murray Sayle, the world’s first bear raider – Isaac le Maire, who forced prices down by dumping stock and then buying it back at a discount. The republic went into a state of general decline in the later 18th century, with economic competition from England and long standing rivalries between the two main factions in Dutch society, the Staatsgezinden (Republicans) and the Prinsgezinden (Royalists or Orangists) as main factors.
Under French influence 1795-1815
On 19 January 1795, a day after stadtholder William V of Orange fled to England, the Batavian Republic (Bataafse Republiek in Dutch) was proclaimed. The proclamation of the Batavian Republic introduced the concept of the unitary state in the Netherlands. From 1795 to 1806, the Batavian Republic designated the Netherlands as a republic modelled after the French Republic.
The Kingdom of Holland 1806 – 1810 (Dutch: Koninkrijk Holland, French: Royaume de Hollande) was set up by Napoleon Bonaparte as a puppet kingdom for his third brother, Louis Napoleon Bonaparte, in order to control the Netherlands more effectively. The name of the leading province, Holland, was now taken for the whole country. The kingdom of Holland covered the area of present day Netherlands, with the exception of Limburg, and parts of Zeeland, which were French territory. In 1807 Prussian East Frisia and Jever were added to the kingdom. In 1809 however, after an English invasion, Holland had to give over all territories south of the river Rhine to France.
King Louis Napoleon did not meet Napoleon’s expectations — he tried to serve Dutch interests instead of his brother’s — and the King had to abdicate on 1 July 1810. He was succeeded by his five year old son Napoleon Louis Bonaparte. Napoleon Louis reigned as Louis II for just ten days as Emperor Napoleon Bonaparte ignored his young nephew’s accession to the throne. The Emperor sent in an army to invade the country and dissolved the Kingdom of Holland. The Netherlands then became part of the French Empire.
From 1810 to 1813, when Napoleon Bonaparte was defeated in the battle of Leipzig, the Netherlands were part of the French Empire.
Kingdom of the Netherlands
In 1795 the last stadtholder William V of Orange fled to England. His son returned to the Netherlands in 1813 to become William I of the Netherlands, Sovereign Prince of the Netherlands. On 16 March 1815 the Sovereign Prince became King of the Netherlands.
In 1815 the Congress of Vienna formed the United Kingdom of the Netherlands, by expanding the Netherlands with Belgium in order to create a strong country on the northern border of France. In addition, William became hereditary Grand Duke of Luxembourg. The Congress of Vienna gave Luxembourg to William personally in exchange for his German possessions, Nassau-Dillenburg, Siegen, Hadamar and Diez.
Belgium rebelled and gained independence in 1830, while the personal union between Luxembourg and the Netherlands was severed in 1890, when King William III of the Netherlands died with no surviving male heirs. Ascendancy laws prevented his daughter Queen Wilhelmina from becoming the next Grand Duchess. Therefore the throne of Luxembourg passed over from the House of Orange-Nassau to the House of Nassau-Weilburg, another branch of the House of Nassau.
The largest Dutch settlement abroad was the Cape Colony. It was established by Jan van Riebeeck on behalf of the Dutch East India Company at Capetown (Dutch: Kaapstad) in 1652. The Prince of Orange acquiesced to British occupation and control of the Cape Colony in 1788. The Netherlands also possessed several other colonies, but Dutch settlement in these lands was limited. Most notable were the vast Dutch East Indies (now Indonesia) and Suriname (the latter was traded with the British for New Amsterdam, now known as New York). These ‘colonies’ were first administered by the Dutch East India Company and the Dutch West India Company, both collective private enterprises. Three centuries later these companies got into financial trouble and the territories in which they operated were taken over by the Dutch government (in 1815 and 1791 respectively). Only then did they become official colonies.
During the 19th century, the Netherlands was slow to industrialize compared to neighbouring countries, mainly due to the great complexity involved in the modernizing of the infrastructure consisting largely of waterways and the great reliance its industry had on windpower.
World War I
Many historians do not recognise the Dutch involvement during World War I. However, recently historians started to change their opinion on the role of the Dutch. Although the Netherlands remained neutral during the war, it was heavily involved in the war.  Von Schlieffen had originally planned to invade the Netherlands while advancing into France in the original Schlieffen Plan. This was changed by Helmuth von Moltke the Younger in order to maintain Dutch neutrality. Later during the war Dutch neutrality would prove essential to German survival up till the blockade integrated by the USA and Great Britain in 1916 when the import of goods through the Netherlands was no longer possible. However, the Dutch were able to remain neutral during the war using their diplomacy and their ability to trade. 
World War II
The Netherlands remained neutral in World War I and intended to do so in World War II. However, Nazi Germany invaded the Netherlands in 1940 in the Western European campaign of the Second World War. The country was quickly overrun and the army main force surrendered on May 14 after the bombing of Rotterdam, although a Dutch and French allied force held the province of Zeeland for a short time after the Dutch surrender. The Kingdom as such continued the war from the colonial empire; the government in exile resided in London.
During the occupation over 100,000 Dutch Jews  were rounded up to be transported to Nazi concentration camps in Germany, Poland and Czechoslovakia. By the time these camps were liberated, only 876 Dutch Jews survived. Dutch workers were conscripted for forced labour in German factories, civilians were killed in reprisal for attacks on German soldiers, and the countryside was plundered for food for German soldiers in the Netherlands and for shipment to Germany. Although there are many stories of Dutch people risking their lives by hiding Jews from the Germans, like in the diary of Anne Frank, there were also Dutch people who collaborated with Nazi occupiers in hunting down and arresting hiding Jews, and some joined the Waffen-SS to form the 4th SS Volunteer Panzergrenadier Brigade Netherlands, fighting on the Eastern Front.
The government-in-exile lost control of its major colonial stronghold, the Netherlands East Indies (Indonesia), to Japanese forces in March 1942. “American-British-Dutch-Australian” (ABDA) forces fought hard in some instances, but were overwhelmed. During the occupation, the Japanese interned Dutch civilians and used both them and Indonesian civilians as forced labour, both in the Netherlands East Indies and in neighbouring countries. This included forcing women to work as “comfort women” (sex slaves) for Japanese personnel. Some military personnel escaped to Australia and other Allied countries from where they carried on the fight against Japan.
After a first liberation attempt by the Allied 21st Army Group stalled, much of the northern Netherlands was subject to the Dutch famine of 1944, caused by the disrupted transportation system, caused by German destruction of dikes to slow allied advances, and German confiscation of much food and livestock and above that all a very severe winter made the “Hunger Winter” of 1944-1945 one in which malnutrition and starvation were rife among the Dutch population. German forces held out until the surrender of May 5, 1945, in Wageningen at Hotel De Wereld.
After the war
After the war, the Dutch economy prospered by leaving behind an era of neutrality and gaining closer ties with neighbouring states. The Netherlands became a member of the Benelux (Belgium, the Netherlands and Luxembourg) grouping. Furthermore, the Netherlands was among the twelve founding members of the North Atlantic Treaty Organisation (NATO) and among the six founding members of the European Coal and Steel Community, which would later evolve, via the EEC (Common Market), into the European Union.