Spain is home to around 300,000 Britons. Together with Portugal, the Iberian peninsula accounts for almost a quarter of all Britons living in Europe, U.N. data shows.
Protesters brandished European Union, Spanish and British flags and held banners reading "They're trying to make us leave the EU" and "Take back control: My grandkids' future".
Spain is the most popular European retirement destination for Britons, with around a third of British residents aged over 65.
Among foreign nationals, they are by far the biggest users of Spain's state-funded universal healthcare system. Many are concerned they will lose their free access to Spanish healthcare, currently assured by the European Union, as a result of Britain's exit from the bloc.