Panama is a country located in Central America, with Panama City serving as its capital. Panama is an isthmus located on the border of Central/North America and South America. In 1538, Spain conquered and settled Panama as a part of New Spain, and Panama was ruled by Spain until 1821, when it joined Gran Colombia after breaking away from Spain. After the 1831 dissolution of Gran Colombia, Panama remained a part of Colombia, but Panama seceded in 1903 amidst a civil war in Colombia. The United States built the Panama Canal through the nascent country with the goal of facilitating travel from the Caribbean and the Atlantic Ocean in the east to the Pacific Ocean in the west, and a 1977 agreement between the USA and Panama led to Panama regaining control over the canal in 1999. During the 1980s, Panama was ruled by the military dictator Manuel Noriega, who trafficked cocaine through the Americas and was also known for his anti-communism. In 1989, during Operation Just Cause, the US government ousted Noriega and his government from power, supposedly because he had committed human rights violations. Panama is known for its large jungles and its canal, and it had the second most competitive economy in Latin America. In 2016, Panama had a population of 4,058,374 people, with 65% being mestizo, 12.3% Native American, 9.2% Afro-Panamanian, 6.8% mulatto, and 6.7% white.