UK Prime Minister Theresa May has expressed support for the way her Spanish counterpart is handling the crisis in Catalonia.
Welcoming Mariano Rajoy to Downing Street talks, Mrs May said that Spain’s constitution needed to be respected.
Madrid has ordered regional elections in Catalonia after separatists pushed for independence following a controversial referendum.
Mrs May said: "I would... like to reiterate my support for Prime Minister Rajoy on Catalonia. It is important that the rule of law is upheld and that the Spanish constitution is respected."
The PM said the UK and Spain were countering international terrorism together.
She said: "We are both countries that have suffered from cowardly and brutal terrorist attacks and we share a determination to defeat terrorism and to defend international security."
Mr Rajoy said it was a "magnificent moment" in relations between Britain and Spain as he thanked the PM for her support over Catalonia.
The Spanish PM said that "without democracy we would simply be going back to the dark ages" as he said constitutional arrangements needed to be safeguarded.
Mr Rajoy said the UK and Spain needed to co-operate to deal with the terror threat.
He said: "We have both been dealt serious and very tough blows in recent times. But, I do believe that we will win this battle against terrorism. And in order to do so our intelligence services have to work in co-operation with each other."