With an area of 505990 sqkm , Spain is the largest country in Southern Europe, the second-largest country in Western Europe, and the European Union, and is the fourth-largest country by area on the European continent.