Mobile began as the first capital of colonial French Louisiana in 1702. The city gained its name from the Native American Mobilian tribe that the French colonists found in the area of Mobile Bay. During its first 100 years, Mobile was a colony for France, then Britain, and lastly Spain. Mobile first became a part of the United States of America in 1810, with the annexation of West Florida under President James Madison. It then left that union in 1861 when Alabama joined the Confederate States of America, which collapsed in 1865.