Tonga (; Tongan: Puleʻanga Fakatuʻi ʻo Tonga), officially the Kingdom of Tonga, is a Polynesian sovereign state and archipelago comprising 176 islands with a surface area of about scattered over of the southern Pacific Ocean, of which 52 are inhabited by its 103,000 people. Seventy percent of Tongans reside on the main island of Tongatapu. Tonga stretches over about in a north-south line about a third of the distance from New Zealand to Hawaii. It is surrounded by Fiji and Wallis and Futuna (France) to the northwest, Samoa to the northeast, Niue to the east, Kermadec (part of New Zealand) to the southwest, and New Caledonia (France) and Vanuatu to the farther west. Tonga became known as the Friendly Islands because of the congenial reception accorded to Captain James Cook on his first visit in 1773. He arrived at the time of the inasi festival, the yearly donation of the First Fruits to the Tui Tonga (the islands’ paramount chief) and so received an invitation to the festivities. According to the writer William Mariner, the chiefs wanted to kill Cook during the gathering but could not agree on a plan. Tonga has never lost its sovereignty to a foreign power. In 2010, Tonga took a decisive step towards becoming a fully functioning constitutional monarchy, after legislative reforms paved the way for its first partial representative elections.