Settled since the end of the last ice age, modern-day Norway became famous in the Middle Ages for its fearless warriors, explorers and traders, the Vikings, who controlled most of Scandinavia, Iceland, Greenland and parts of France, Britain, and Ireland between AD 800 and AD 1100, and were also known to travel as far as Constantinople, Greece, Northern Africa and Newfoundland. A number of small Norwegian communities were gradually organized into larger regions in the 9th century, and in 872 King Harald Fairhair (Harald Hårfagre) unified the realm and became its first supreme ruler. After being united under a single king and christened, Norway united with Denmark and Sweden in the Kalmar Union (1397-1523), which ended when Sweden seceded and Norway and its possessions quickly sank to the status of provinces under Denmark. Norway's power were further weakened by the fact that one third of the population died during the Black Deathpandemic of 1349-1351. Many towns lost all their population and remain empty today. Norway's provincial status lasted until 1814; this period is called "the-400-year-night".

In 1814Denmark was defeated in the Napoleonic wars and ceded Norway to Sweden in the Treaty of Kiel[?] (January 14). Owing to an omission in the treaty, the traditional Norwegian outposts of Iceland, Greenland and the Faeroe Islands were kept by Denmark. In an attempt to retain control over Norway despite the treaty, Denmark encouraged representatives of various social and political factions to gather at Eidsvoll to declare independence, draft a constitution and elect a king (who coincidentally happened to be the Crown Prince of Denmark). Sweden responded later the same year by waging war on Norway, which forced King Christian to renounce his claim and return to Denmark. Sweden then acknowledged the newly drafted constitution. May 17 is celebrated as the day of the new constitution, under which Norway has its own parliament (Stortinget), but continued to be ruled by the king of Sweden, which means Norway was in a union with Sweden. The union was dissolved in 1905 after several years of political unrest. Prince Charles of Denmark was elected King of Norway by referendum and assumed the throne under the Norwegian name of Haakon VII.

Norway remained neutral during World War I. As World War II erupted, Norway insisted on remaining neutral despite warnings from some political factions that the country's strategic importance was too great for Germany to leave it alone, and attempts from the same factions to obtain political consensus to build up sufficient defences to withstand an invasion long enough for Allied reinforcements to arrive.

In a surprise dawn attack on April 9th, 1940, German forces attacked Oslo and the major Norwegian ports (Bergen, Trondheim and Narvik) and quickly gained footholds in those cities and the surrounding areas. The Norwegian army, manning an ancient fort in the Oslofjord, sank a German troop vessel using cannons that had been preserved as an historic exhibit. This delayed the German invasion long enough for King Haakon, the parliament, and government to escape the city with much of the treasury, eventually forming a government in exile in London.

The Norwegian politician Vidkun Quisling attempted a coup the same day, but was met with such strong resistance from the people that the Germans deposed him within a week and installed a bureaucratic administration in lieu of a government. However, in 1942 this administration was replaced with an occupation government with the ineffective Quisling being named minister president by German commander Josef Terboven. Quisling's name has come to mean "traitor" in several languages.

Despite the strength of the German position and the lack of air support, the Norwegian armed forces kept up an organized military resistance for more than two months, longer than any other country except the Soviet Union.

King Haakon VII and his government fled to Britain on June 7th, the same day the French forces that had retaken Narvik abandoned it to return to a quickly disintegrating France. The continued existence of a legitimate Norwegian government gave the exiles considerably more room for action than the French. The worldwide operations of the large Norwegian merchant fleet was a material aid to the allies.

The Norwegian resistance movement (both civilian resistance and some pockets of military resistance that did not surrender in 1940) remained very active throughout the war. Norwegian resistance kept many German divisions tied down in occupation duty and Norwegian spotters led to the destruction of numerous German warships. The Norwegian resistance also smuggled people in and out of Norway during the war and also managed to snatch the world's supply of heavy water and also destroy a heavy water plant, thus perhaps preventing the Germans from developing an atomic bomb.

The Norwegian merchant ships that were in Allied waters at the time were requisitioned by the exiled Norwegian Government in London. The Norwegian Shipping and Trade Mission was established in London shortly thereafter, and the name abbreviated to Nortraship, following a suggestion from the British Postal Services. Main duties were that of war transports, supply services etc. including the supply of food, ammunition and reinforcements to the front lines, besides evacuating the wounded. Nortraship had 1081 ships with 33,000 sailors. 570 ships were lost (these numbers vary according to source), along with 3734 sailors. By the end of the war, Norwegian naval vessels were also fighting alongside the British and unlike most occupied countries, Norway was counted as a victor in World War 2.

Following the failure of neutrality in World War 2 in 1949, neutrality was abandoned and Norway became a member of NATO and was a founding member of the United Nations. The first UN General Secretary[?], Trygve Lie, was a Norwegian. The discovery of oil and gas in adjacent waters in the late 1960s boosted Norway's economic fortunes. The current focus is on containing spending on the extensive welfare system and planning for the time when petroleum reserves are depleted. In referenda held in 1972 and 1994, Norway rejected joining the EU.

Norway resumed allowing whaling with low quotas in 1993, in spite of protests from environmental organizations. Norway is a firm believer in sustainable development of its natural resources, and firmly believes that a quota of approximately 500 whales a year out of about 120,000 whales is reasonable.