Niue was settled by Polynesians from Samoa around AD. Further settlers (or invaders) arrived from Tonga in the th century.
Until the beginning of the th century, there appears to have been no national government or national leader. Before then, chiefs and heads of families exercised authority over segments of the population. Around the concept and practice of kingship appear to have been introduced through contact with Samoa or Tonga. From then a succession of patu-iki (kings) ruled the island, the first of whom was Puni-mata. Tui-toga, who reigned from to , was the first Christian king.
The first European to sight Niue was Captain James Cook in . Cook made three attempts to land on the island but was refused permission to do so by the Polynesian inhabitants. He named the island "Savage Island" because, legend has it, the natives that "greeted" him were painted in what appeared to Cook and his crew to be blood. However, the substance on their teeth was that of the hulahula, a native red banana.
For the next couple of centuries the island was known as Savage Island, until its original name Niu e, which translates as "behold the coconut", regained use.
The next notable European visitors were from the London Missionary Society who arrived in on the "Messenger of Peace". After many years of trying to land a European missionary on Niue, a Niuean named Nukai Peniamina was taken to Samoa and trained as a Pastor at the Malua Theological College. Peniamina returned as a missionary with the help of Toimata Fakafitifonua. He was finally allowed to land in Uluvehi Mutalau after a number of attempts in other villages had failed. The Chiefs of Mutalau village allowed Peniamina to land and assigned over warriors to protect him day and night at the fort in Fupiu.
Christianity was first taught to the Mutalau people before it was spread to all the villages on Niue; originally other major villages opposed the introduction of Christianity and had sought to kill Peniamina. The people from the village of Hakupu, although the last village to receive Christianity, came and asked for a "word of god"; hence their village was renamed "Ha Kupu Atua" meaning "any word of god", or "Hakupu" for short.
In , King Fata-a-iki, who reigned from to , offered to cede sovereignty to the British Empire, fearing the consequences of annexation by a less benevolent colonial power. The offer was not accepted until .
Niue was a British protectorate for a time, but the UK's direct involvement ended in when New Zealand annexed the island. Independence in the form of self-government was granted by the New Zealand parliament with the constitution, following a referendum in Niue in whereby Niueans were given