It was in Tahiti that the transformation of Julien Viaud into Pierre Loti began, a transformation that would come to characterize Loti's future work and life. He "went native": living among the local people, learning the language, wearing their dress, adopting their customs, loving their women, even adopting the new pseudonym of "Loti" given to him by the local natives--all the while retaining his military duties, and keeping a detailed diary which would become the source for his novel. Cavorting with natives while on active duty might appear unusual, but French military custom did not generally prevent its officers from socializing with other classes, unlike the English military, so it was easy for Loti to divide his attentions and duties between the navy and the Tahitians. Further, the admiral of the fleet had a personal interest in the history and anthropology of Tahiti and encouraged Loti to learn more.
The Marriage of Loti can be seen both as a non-fiction account of Loti's true-life experiences, and a literary work. Most the main characters were real people, however Rarahu herself was not--Loti admitted in a letter dated 1879 that she was a composite of many women he had liaisons with during his two months in Tahiti. Loti himself goes by the name of "Harry Grant" in the novel, an English naval officer, to hide his real identity (this was before the public knew Pierre Loti/Harry Grant was actually Julien Viaud). The plot correctly follows known facts about Loti's life and generally corresponds with his diaries. Many of the details such as dialog and specific events were embellished for dramatic effect.
The Marriage of Loti was first published in 1880 under the title Rarahu and later editions under the new title. It was received with wide acclaim from both critics and the public. Le Figaro described it as "one of the most charming works to have appeared for a long time," and Le Temps found it "charming, new without extravagance, original without affection." The public found its exotic and lyric prose a sharp and welcome contrast from the in-vogue French realist school that included such authors as Emile Zola.
A reason for the novel's success was that it reflected prevailing imperialistic attitudes towards the colonies, seeing the natives as innocent and wild children of the forest exposed to the fearsome and old paternal European culture. This was during a period (1880s to 1900s) when European imperialism had reached its height and the genre of "romantic exoticism", of which this work is one of the finest examples, struck a popular chord. In a post-colonial perspective it is largely seen as racist and imperialistic. As biographer Lesley Blanch says, "Loti's works helps to sustain [the] gratifying image of cultural superiority among his European readers. To enjoy reading Loti is to enjoy the personal and cultural complacency of which the colonial venture thrived." However Loti's lyrical prose and hauntingly vivid descriptions of the Polynesian islands are artistically satisfying, and the tragic ending, as Loti's recognizes his failure through a broken heart, adds a more human and universal dimension to the strictly colonial interpretation.