Passage: The Maldives archipelago is located on the Chagos-Laccadive Ridge, a vast submarine mountain range in the Indian Ocean, which also forms a terrestrial ecoregion, together with the Chagos Archipelago and Lakshadweep. With an average ground-level elevation of 1.5 metres (4 ft 11 in) above sea level, it is the world's lowest country, with even its highest natural point being one of the lowest in the world, at 5.1 metres (17 ft). Due to the consequent risks posed by rising sea levels, the government pledged in 2009 to make the Maldives a carbon-neutral country by 2019.Islam was introduced to the Maldivian archipelago in the 12th century which was consolidated as a sultanate, developing strong commercial and cultural ties with Asia and Africa. From the mid-16th-century, the region came under the increasing influence of European colonial powers, with the Maldives becoming a British protectorate in 1887. Independence from the United Kingdom was granted in 1965 and a presidential republic was established in 1968 with an elected People's Majlis. The ensuing decades have been characterised by political instability, efforts at democratic reform, and environmental challenges posed by climate change.The Maldives is a founding member of the South Asian Association for Regional Cooperation (SAARC). It is also a member of the United Nations, the Organization of Islamic Cooperation, and the Non Aligned Movement. The World Bank classifies the Maldives as having an upper middle income economy. Fishing has historically been the dominant economic activity, and remains the largest sector by far, followed by the rapidly growing tourism industry. Maldives is rated "high" on the Human Development Index, with its per capita income significantly higher than other SAARC nations.The Maldives was a Commonwealth republic from July 1982 until its withdrawal from the Commonwealth in October 2016 in protest of international criticism of its records in relation to corruption and human rights.

Question: What was one way that the Maldives gained independence from the United Kingdom?
presidential republic was established in 1968