While settled by Micronesians in the 2nd millennium BC, little is known of the early history of the islands. Spanish explorer Alonso de Salazar was the first European to sight the Marshalls in 1526, but the islands remained virtually unvisited by Europeans for several more centuries, before being visited by English captain John Marshall in 1788; the islands owe their name to him.
A German trading company settled on the islands in 1885, and they became part of the protectorate of German New Guinea some years later. Japan conquered the islands in World War I, and administered them as a League of Nations mandate.
In World War II, the United States invaded the islands (1944), and they were added to the Trust Territory of the Pacific Islands (including several more island groups in the South Sea).
In 1979 the Republic of the Marshall Islands was established and a Compact of Free Association with the U.S. government was signed, becoming effective in 1986. The independence was formally completed under international law in 1990, when the UN officially ended the trust given to the USA.