Spain is a parliamentary monarchy of southwestern Europe that occupies most of the Iberian Peninsula; It limits to the north with the Cantabrian Sea, France and Andorra; to the east with the Mediterranean Sea; to the south with the Mediterranean Sea and the Atlantic Ocean and to the west with Portugal and the Atlantic Ocean. The British dependency of Gibraltar is located in the southern tip of Spain. The Balearic Islands, in the Mediterranean, and the Canary Islands, in the Atlantic Ocean, off the coasts of Western Sahara and Morocco, constitute the two autonomous island communities of Spain. The autonomous cities of Ceuta and Melilla, as well as three groups of islands near Africa: the Peñón de Vélez de la Gomera, the Peñón de Alhucemas and Chafarinas, are also an integral part of the Spanish State, although they are located in African territory. The extension of Spain, including the African and island territories, is 505,990 km². Madrid is the capital and the main city of the country.