*Passport stamping for UK Nationals resident in Spain*
Many of you who are resident in Spain and protected by the Withdrawal Agreement have contacted us to say that your passport has been stamped on entering or leaving Spain (or both). The most important thing is that this does not affect your residency or rights within Spain and any stamp should be considered null and void when accompanied by a valid residence document. 
In March, the European Commission published an amended note on rules for stamping the passports of Withdrawal Agreement beneficiaries, which says: “The Commission considers that there is little practical use in stamping passports of Withdrawal Agreement beneficiaries. Stamping a passport serves to establish whether a non–EU national respected the authorised length of a short stay within the Schengen area, but beneficiaries of the Withdrawal Agreement in a Schengen Member State are not required to leave the Schengen area as they legally reside in one of the Schengen Member State.” You can read the complete note here: https://ec.europa.eu/info/sites/default/files/rules_for_uk_nationals_when_entering_or_leaving_the_schengen_area_for_publication_v2_en.pdf
So, whilst the Commission considers that there is little use in border guards stamping the passports of Withdrawal Agreement beneficiaries, EU law does not prevent them doing so. 
If you wish to complain about instances of passport stamping, you should contact the European Commission’s Citizens’ Assistance Service https://europa.eu/youreurope/citizens/residence/brexit-residence-rights/uk-nationals-living-in-eu/index_en.htm.