Ra'iātea and
Taha'a had been united prior to their conversion to
Christianity, under the rule of
Tamatoa III, King of Ra'iātea. Around April 1831,
Fenuapeho, the chief of Taha'a died, and authority passed to the young Teri'inohora'i, who assumed the title of Tapoa II. Offended by the King of Ra'iātea over a dispute concerning land on Ra'iātea that he claimed as his own, Tapoa II resolved to detach the government of Taha'a from Ra'iātea and transfer it to the chiefs of
Bora Bora, to which it had been joined in earlier times. King Tamatoa III strongly opposed to the change of government, but fell ill at the end of May during a military expedition intended to restore the exiled people of Taha'a to their lands. He died in the first half of June 1831, in the presence of the missionary
John Williams, his family, and the chiefs of Huahine. He was succeeded by his son Moe'ore, who assumed the title of
Tamatoa IV and continued to resist the ambitions of Tapoa II. Moe'ore received support from
Mahine,
Ma'ihara, Queen
Teri'itaria, as well as from the chiefs of Ra'iātea and Huahine, including Teari'ifa'atau and Tera'imano (formerly known as Turaiari'i), the daughter of the late
Tenani'a. Tapoa II, by contrast, was supported by the chiefs of Taha'a, several chiefs of Ra'iātea who had betrayed the late Tamatoa III, and by Tefa'aora II,
Ma'i III, together with the chiefs of Bora Bora. The conflict quickly escalated into armed clashes, with three battles fought on the island of
Taha'a, the last of which resulted in Tapoa II's defeat at Vaitoare on 3 April 1832, where over fifty men were killed. Tapoa II and his partisans were subsequently exiled to
Huahine. The entire plot appeared to have been orchestrated by certain leaders of the heretical sect that had arisen some years earlier among the
Society Islands. Following the meeting of May 1832, a general peace plan was submitted for the approval of Queen
Pōmare IV. The resulting treaty divided the territories: Ra'iātea and Taha'a were entrusted to Tamatoa IV, while Bora Bora and
Maupiti, were assigned to Tapoa II. A new code of laws was deemed necessary to govern these islands. Later that year, Queen Pōmare IV distanced herself from her spouse Tapoa II and married her cousin
Tenani'a. Celebrated in
Mo'orea on 3 December 1832, by missionary
Henry Nott, the marriage sparked intense political and social controversy in early 1833. ==Second marriage and Coronation as King of Bora Bora and Maupiti==