Madrid is preparing to issue new residency permits for Britons, as well as guaranteeing free healthcare and welfare payments.
Spain wants to guarantee the rights of 400,000 British expats living in the country in the event of a no-deal Brexit.
The Spanish government announced on Friday it is preparing to issue new residency permits to UK citizens.
Around 300,000 Britons are already legally resident in Spain and are included in that number, but will need a new type of residence card.
Madrid is also offering to continue to provide free healthcare to UK citizens for 21 months after Brexit, while Britons will still be entitled to Spanish welfare payments.
All the measures still require approval by Spain’s parliament and depend on the UK government making reciprocal guarantees for Spanish citizens in Britain.
At least 150,000 Spaniards are currently living in the UK.
It follows moves by other EU member states to guarantee the rights of UK citizens living in their countries should Britain leave the bloc later this month without a withdrawal agreement.
France has already published draft laws seeking to protect the rights of British expats in the country in the event of a no-deal Brexit, subject to reciprocal measures from the UK government.
Germany has also made similar guarantees.
Prime Minister Theresa May has previously guaranteed the rights of EU citizens in the UK in the event of a no-deal Brexit.
On Thursday, the European Commission rejected a call for the UK and EU to make a joint commitment to safeguard citizens’ rights ahead of a possible no-deal Brexit.
Brussels dismissed a proposal for a “mini-deal” on the issue to be carved out of Mrs May’s withdrawal agreement, despite a unanimous House of Commons request for such an accord.
MPs backed a demand on Wednesday for Mrs May to “seek at the earliest opportunity” a UK-EU commitment to adopt and implement those agreements on citizens’ rights that are within her Brexit deal, before the UK’s exit.
However, Brussels has called on member states to take a generous approach to the UK nationals who are already resident in their territory.
Tory MP Alberto Costa, who spearheaded the Commons demand, has written to European Council president Donald Tusk to ask for a meeting to discuss the proposal.
Mr Costa tweeted: “It would be politically injudicious for the European Council/UK not to agree a separate deal on citizens’ rights whatever the Brexit outcome.”