Fiji during the time of Cakobau

The first three-quarters of the 19th century were marked by tribal warfare, incursions from neighbouring Tonga, and the increasing encroachment of foreign powers. This period also saw the rise of a warlord by the name of Seru Epenisa Cakobau, who forged the first nation-state covering all of modern Fiji (except the island of Rotuma) in 1871, before ceding it to the United Kingdom in 1874.
Tribal warfare and Tongan intrusions.
In the early 1820s, Levuka was established as the first modern town in Fiji, on the island of Ovalau. The intervention of European traders and missionaries, of whom the first arrived from Tahiti in 1830, led to increasingly serious wars among the native Fijian confederacies. Supplied with weapons by Swedish mercenary Charlie Savage, Ratu Tanoa Visawaqa, the Vunivalu (a chiefly title meaning "Warlord," often translated also as "Paramount Chief") of Bau Island, defeated the much larger Burebasaga Confederacy and succeeded in subduing much of western Fiji. 
His successor, Seru Epenisa Cakobau, fought to consolidate Bauan domination throughout the 1850s and 1860s, and started calling himself the "Tui Viti," or King of Fiji. He faced opposition from local chiefs who saw him at best as first among equals, and also from the Tongan Prince Enele Ma'afu, who had established himself on the Island of Lakeba in the Lau archipelago in 1848. 
A Christian, Ma'afu brought Wesleyan missionaries from Tonga, and the Methodist Church gained its first foothold in Fiji. Most chiefs in the west regarded the Wesleyan missionaries, aligned as they were seen to be with Ma'afu, as a threat to their power, refused conversion, and resisted missionary attempts to set up outposts in their villages.
Trouble with the United States.
Cakobau's claimed position was also undermined by international developments. The United States threatened intervention following a number of incidents involving their consul, John Brown Williams. His trading store had been looted by Fijian natives following an intentional fire, caused by what was said to be stray cannon fire during a Fourth of July celebration in 1849. When his Nukulau Island house was subjected to an arson attack in 1855, the commander of the United States naval frigate demanded compensation amounting to 5000 pounds for Williams from Cakobau, as the "Tui Viti." 
This initial claim was supplemented by further claims totalling 45,000 pounds. Cakobau was faced with a dilemma. To disclaim responsibility for the debt, he would have to deny his self-proclaimed and still far-from-universally accepted sovereignty. To admit responsibility, he would have to undertake to pay the debt, or else face punishment from the United States Navy. He chose the latter course, hoping that the United States was only bluffing.
Reality began to catch up with Cakobau in 1858, when the USS "Vandalia" sailed into Levuka. Unable to pay his debt, and faced with increasing encroachments onto Viti Levu's south coast from Ma'afu, Cakobau approached the British consul with an offer to cede the islands to the United Kingdom, if only they would assume responsibility for his debt in return for 5,000 square kilometres of land. 
His insistence on being allowed to retain his questionable title of "Tui Viti" proved unacceptable to the British government, which turned his offer down after four years of consideration in 1862. This followed a report from Colonel W.J. Smythe, who had come to the conclusion, after interviewing every Paramount Chief in Fiji, that Cakobau's title was self-assumed and by no means universally accepted by his fellow chiefs, and that he did not have the authority to cede the islands.
The Kingdom of Fiji.
Cakobau next turned to the Australian-based Polynesia Company. The rising price of cotton in the wake of the American Civil War (1861–1865) had interested the Polynesia Company in acquiring land in Fiji for planting. In return for 5,000 km², the company agreed to pay Cakobau's debt. Australian settlers landed on of land in Viti Levu, near what was then a Fijian village called Suva, in 1868.
The Polynesia Company settlers were joined by a further several thousand planters throughout the 1860s and 1870s. Often fraudulently, they obtained Fijian land, often in exchange for weapons or alcohol. Competing land claims followed, with no unified government to settle the disputes. Frustrations peaked following the collapse of cotton prices and the destruction of the crop by hurricanes in 1870. 
In June 1871, John Bates Thurston, the British honorary consul, forged a "marriage of convenience" between Cakobau and the settlers, and persuaded the Fijian chiefs to accept a constitutional monarchy with Cakobau as king, but with real power in the hands of a cabinet and Legislature dominated by settlers. The Legislative Assembly met for the first time in Levuka in November 1871.
Cession to the United Kingdom.
The new arrangements proved no more workable than the old. Within months, government overspending had led to the accumulation of another unmanageable debt. In 1872, following continuing economic and social unrest, Thurston approached the British government, at Cakobau's request, with another offer to cede the islands. The British were much more sympathetic to annexing Fiji this time than they had been almost two decades earlier.
The murder of Bishop John Coleridge Patteson of the Melanesian Mission at Nukapu in the Reef Islands had provoked public outrage, which was compounded by the massacre by crew members of more than 150 Fijians on board the brig "Carl." Two British commissioners were sent to Fiji to investigate the possibility of an annexation. The question was complicated by manoeuvrings for power between Cakobau and his old rival, Ma'afu, with both men vacillating for many months.
On 21 March 1874, Cakobau made a final offer, which the British accepted. On 23 September, Sir Hercules Robinson, soon to be appointed the British Governor of Fiji, arrived on HMS "Dido" and received Cakobau with a royal 21-gun salute. After some vacillation, Cakobau agreed to renounce his "Tui Viti" title.
The formal cession took place on 10 October 1874, when Cakobau, Ma'afu, and some of the senior Chiefs of Fiji signed two copies of the Deed of Cession. Thus the Colony of Fiji was founded; 96 years of British rule followed.