For thousands of years, indigenous peoples were the only inhabitants of the territory that is now Maine. At the time of European arrival in what is now Maine, several Algonquian-speaking peoples inhabited the area. The first European settlement in the area was by the French in 1604 on Saint Croix Island, by Pierre Dugua, Sieur de Mons. The first English settlement was the short-lived Popham Colony, established by the Plymouth Company in 1607. A number of English settlements were established along the coast of Maine in the 1620s, although the rugged climate, deprivations, and conflict with the local peoples caused many to fail over the years.
As Maine entered the 18th century, only a half dozen European settlements had survived. Loyalist and Patriot forces contended for Maine's territory during the American Revolution and the War of 1812. During the War of 1812, the largely-undefended eastern region of Maine was occupied by British forces, but returned to the United States after the war following major defeats in New York, Maryland and Louisiana, as part of a peace treaty that was to include dedicated land on the Michigan peninsula for Native American peoples. Maine was part of the Commonwealth of Massachusetts until 1820, when it voted to secede from Massachusetts to become a separate state. On March 15, 1820, under the Missouri Compromise, it was admitted to the Union as the 23rd state.