Spain is surrounded by France, Gibraltar, Portugal and Morocco. Andorra, one of the tiniest countries in the world, is located on the mountainous border between Spain and France. Gibraltar is considered an overseas territory of the United Kingdom.
The Spanish exclaves of Ceuta and Meliilla are located on the coast of Morocco, and there's also a tiny piece of a border between Morocco and Penon de Velez de la Gomera, another Spanish possession. Spain also owns the autonomous islands that make up the Balearic and Canary Islands, as well as small islands off the Moroccan coast.
The total area of Spain is 195,360 square miles, which makes it the 52nd largest country in the world. Its border with Portugal is its longest at 760.5 miles, followed by France at 401 miles. Its border with Andorra is 39 miles. Its border with Morocco is about 5 miles for Ceuta and 6.5 miles for Melilla. The border segment between Morocco and Penon de Velez de la Gomera is about 47 miles.
Spain is separated from France by the Pyrenees mountains, but its highest point is actually Pico de Teide, a 12,198 foot high mountain on the island of Tenerife in the Canary Islands.