Decided at the Congress of Vienna (September 1814 to June 1815):
To compensate for Orange-Nassau's loss of the Nassau lands to Prussia, the United Kingdom of the Netherlands and the Grand Duchy of Luxembourg were to form a personal union under the House of Orange-Nassau, with Luxembourg (but not the Netherlands) inside the German Confederation. To satisfy Prussia, it was decided that not only the Fortress of Luxembourg be manned by Prussian troops, but also that large parts of Luxembourgish territory (mainly the areas around Bitburg and St. Vith) become Prussian possessions. This marked the second time that the Duchy of Luxembourg was reduced in size, and is generally known as the Second Partition of Luxembourg. To compensate the Duchy for this loss, it was decided to elevate the Duchy to a Grand-Duchy, thus giving the Dutch monarchs the additional title of Grand-Duke of Luxembourg.
After Belgium became an independent country following the victorious Belgian Revolution of 1830-1831, it claimed the entire Grand-Duchy of Luxembourg as being part of Belgium, however the Dutch King who was also Grand Duke of Luxembourg, as well as Prussia, didn't want to lose their grip on the mighty fortress of Luxembourg and did not agree with the Belgian claims. The dispute would be solved at the 1839 Treaty of London where the decision of the Third Partition of Luxembourg was taken. This time the territory was reduced by more than half, as the predominantly francophone western part of the country (but also the then Luxembourgish-speaking part of Arelerland) was transferred to the new state of Belgium and with it giving Luxembourg its modern-day borders. The treaty of 1839 also established full independence of the remaining Germanic-speaking Grand-Duchy of Luxembourg.
As a result of the recurring disputes between the major European powers, the people of Luxembourg gradually developed a consciousness of independence and a national awakening took place in the 19th century. The people of Luxembourg began referring to themselves as Luxembourgers, rather than being part of one of the larger surrounding nations. This consciousness of Mir wëlle bleiwe wat mir sinn culminated in 1890, when the last step towards full independence was finally taken: due to a succession crisis the Dutch monarchy ceased to hold the title Grand-Duke of Luxembourg. Beginning with Adolph of Nassau-Weilburg, the Grand-Duchy would have their own monarchy, thus reaffirming its full independence
With regard to Dutch monarchy succession crisis:
King Willem III had 3 sons with his first wifes and 1 daughter with his second wife. All his sons predeceased him. So he was succeeded by his daughter Wilhelmina.
Her mother Emma was regent until her eighteenth birthday. In the Grand Duchy of Luxembourg, only male descendants from the House of Nassau were entitled to inherit according to the inheritance agreement concluded (the Nassau Family Pact AND the fact that Luxembourg was part of the German Confederation). There the Grand Ducal crown passed to a distant relative of the House of Nassau, Adolf, head of the Walram branch of Nassau.