On what was May's first visit to Spain since becoming Prime Minister in July in the wake of the referendum result, the two leaders met at Moncloa palace for a walk in the gardens followed by a working lunch.
The acting Spanish prime minister sought to reassure May and the up to one-million Brits who reside in Spain for at least part of the year that Spain was keen to minimize the impact of Brexit.
He told the British prime minister that although he "profoundly regretted" the decision by the British electorate to choose Brexit, he was committed to ensure that the interests of Spaniards -those living in the UK and those with business there - would not be "adversely affected by the new situation".
"In the same way that Spain is going to defend the interests of Spaniards in the UK, the British who are living in Spain, the millions of tourists who visit Spain and the British companies based here should keep calm," said a written statement from Moncloa.
He insisted that Spain wants to keep the same wide-ranging and friendly relationship with Britain on a bilateral level as it did within the European Union.
"Rajoy told the British Prime Minister that Spain wants to carry on the same close and friendly relationship with the UK,"
The leaders declined to hold a press conference following their meeting or even make a joint public statement. Instead a note was issued by the Moncloa press office.
Rajoy did tell May that Spain would not under any circumstances support any independence movement within the United Kingdom, presumably in reference to the announcement that Scotland would seek to hold another referendum on independence.
"Mariano Rajoy also expressed to the British Prime Minister that Spain supports the integrity of the UK and will not encourage any kind of secessionism related to the exit from the European Union," the statement said.
Any such movement would have repercussions when it comes to Catalonia's own desire to breakaway from Spain.