In 1772, the Spanish Viceroy of Peru Don Manuel de Amat ordered a number of expeditions to Tahiti under the command of Domingo de Bonechea who was the first European to explore all of the main islands beyond Tahiti. A short-lived Spanish settlement was created in 1774, and for a time some maps bore the name Isla de Amat after Viceroy Amat. Christian missions began with Spanish priests who stayed in Tahiti for a year. Protestants from the London Missionary Society settled permanently in Polynesia in 1797.
King Pōmare II of Tahiti was forced to flee to Mo’orea in 1803; he and his subjects were converted to Protestantism in 1812. French Catholic missionaries arrived on Tahiti in 1834; their expulsion in 1836 caused France to send a gunboat in 1838. In 1842, Tahiti and Tahuata were declared a French protectorate, to allow Catholic missionaries to work undisturbed. The capital of Papeetē was founded in 1843. In 1880, France annexed Tahiti, changing the status from that of a protectorate to that of a colony. The island groups were not officially united until the establishment of the French protectorate in 1889.
After France declared a protectorate over Tahiti in 1840 and fought a war with Tahiti (1844–1847), the British and French signed the Jarnac Convention in 1847, declaring that the kingdoms of Raiatea, Huahine and Bora Bora were to remain independent from either powers and that no single chief was to be allowed to reign over the entire archipelago. France eventually broke the agreement, and the islands were annexed and became a colony in 1888 (eight years after the Windward Islands) after many native resistances and conflicts called the Leewards War, lasting until 1897.
In the 1880s, France claimed the Tuamotu Archipelago, which formerly belonged to the Pōmare Dynasty, without formally annexing it. Having declared a protectorate over Tahuata in 1842, the French regarded the entire Marquesas Islands as French. In 1885, France appointed a governor and established a general council, thus giving it the proper administration for a colony. The islands of Rimatara and Rūrutu unsuccessfully lobbied for British protection in 1888, so in 1889 they were annexed by France. Postage stamps were first issued in the colony in 1892. The first official name for the colony was Établissements de l’Océanie (Establishments in Oceania); in 1903 the general council was changed to an advisory council and the colony’s name was changed to Établissements Français de l’Océanie (French Establishments in Oceania).
In 1940, the administration of French Polynesia recognized the Free French Forces and many Polynesians served in World War II. Unknown at the time to the French and Polynesians, the Konoe Cabinet in Imperial Japan on 16 September 1940 included French Polynesia among the many territories which were to become Japanese possessions, as part of the “Eastern Pacific Government-General” in the post-war world. However, in the course of the war in the Pacific the Japanese were not able to launch an actual invasion of the French islands.