Panama (Spanish: Panamá), officially the Republic of Panama (Spanish: República de Panamá [reˈpuβlika ðe panaˈma]), is the southernmost country of Central America. Situated on the isthmus connecting North and South America, it is bordered by Costa Rica to the west, Colombia to the southeast, the Caribbean to the north and the Pacific Ocean to the south. The capital is Panama City. Explored and settled by the Spanish in the 16th century, Panama broke with 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. Nueva Granada later became the Republic of Colombia.