<Tr> <Th> ISO 3166 code </Th> <Td> PA </Td> </Tr> <Tr> <Th> Internet TLD </Th> <Td>. pa </Td> </Tr> <P> Panama (/ ˈpænəmɑː / (listen) PAN-ə - mah; Spanish: Panamá (panaˈma)), officially called the Republic of Panama (Spanish: República de Panamá), is a country in Central America . It is bordered by Costa Rica to the west, Colombia (in South America) to the southeast, the Caribbean Sea to the north and the Pacific Ocean to the south . The capital and largest city is Panama City, whose metropolitan area is home to nearly half of the country's 4 million people . </P> <P> Panama was inhabited by several indigenous tribes prior to settlement by the Spanish in the 16th century . Panama broke away from Spain in 1821 and joined a union of Nueva Granada, Ecuador, and Venezuela named the Republic of Gran Colombia . When Gran Colombia dissolved in 1831, Panama and Nueva Granada remained joined, eventually becoming the Republic of Colombia . With the backing of the United States, Panama seceded from Colombia in 1903, allowing the Panama Canal to be built by the U.S. Army Corps of Engineers between 1904 and 1914 . In 1977 an agreement was signed for the transfer of the Canal from the United States to Panama by the end of the 20th century, which culminated on December 31, 1999 . </P>

What is the capital of the central american country that has a canal running through it