Gibraltar is a British Overseas Territory located at the southern tip of the Iberian Peninsula. It has an area of 6.7 km2 (2.6 sq mi) and is bordered to the north by Spain. In 1704, Britain captured Gibraltar from Spain during the War of the Spanish Succession on behalf of the Habsburg claim to the Spanish throne. The territory was ceded to Great Britain in perpetuity under the Treaty of Utrecht in 1713.
As per the UN World Population Prospects, the estimated population of Gibraltar in 2023 is 32,689 (33 thousand)
read about top countries in Europe by Population