Costa Rica, officially the Republic of Costa Rica, is a sovereign state in Central America. It borders Nicaragua to the north, the Caribbean Sea to the northeast, Panama to the southeast, and the Pacific Ocean to the southwest, sharing a maritime border with Ecuador to the south of Cocos Island. It has a population of around five million in a land area of nearly 51,180 km2 (19,760 sq mi); the capital and largest city is San José, home to around 350,000 residents and two million people in the surrounding metropolitan area.