"I am absolutely convinced that we will reach an agreement so that these people will not be affected by political decisions," Rajoy told AFP in an interview this week.
Up to one million Britons are estimated to be living in Spain, many of them pensioners enjoying sunnier climes.
They currently receive healthcare coverage under EU mechanisms that give them the same treatment as locals, but this access could become prohibitively expensive once Britain leaves the EU.
"I hope that we will soon be able to tell them: Don't worry, nothing is going to change for the Spaniards in the United Kingdom, nor for the Britons in Spain," he said.
He said the negotiations would start after an EU summit that will convene once Britain formally begins its EU divorce proceedings, expected for the end of March.
He also noted the importance of British tourism to his country, which attracts more visitors from Britain than any other country.
"Last year 17 million Britons came to Spain, and we want that to continue," he said. "They like it, and so do we."
Rajoy also reiterated that he would use Brexit to renegotiate with London the status of Gibraltar, the tiny territory on Spain's southern tip that was ceded to Britain in 1713.
"We are going to ask that all decisions affecting Gibraltar be made bilaterally between the United Kingdom and Spain," he said.
Madrid has recently offered dual citizenship to Gibraltarians in exchange for joint sovereignty of the territory, which offers strategic control of access to the Mediterranean.
"I think that our proposal of shared sovereignty is quite reasonable," Rajoy said - although both London and the government of Gibraltar have rejected the idea.