In 1907, Ugyen Wangchuck was elected as the hereditary ruler of Bhutan, crowned on December 17, 1907, and installed as the head of state, the Druk Gyalpo (Dragon King). In 1910, King Ugyen and the British signed the Treaty of Punakha which provided that British India would not interfere in the internal affairs of Bhutan if the country accepted external advice in its external relations. When Ugyen Wangchuck died in 1926, his son Jigme Wangchuck became the ruler, and when India gained independence in 1947, the new Indian Government recognized Bhutan as an independent country. In 1949, India and Bhutan signed the Treaty of Peace and Friendship, which provided that India would not interfere in Bhutan's internal affairs, but would guide its foreign policy. Succeeded in 1952 by his son Jigme Dorji Wangchuck, Bhutan began to slowly emerge from its isolation and began a program of planned development. The National Assembly of Bhutan, the Royal Bhutanese Army, and the Royal Court of Justice were established, along with a new code of law. Bhutan became a member of the United Nations in 1971.