Britain will not recognise the Catalan parliament’s declaration of independence from Spain, Downing Street has said.

Prime Minister Theresa May’s official spokesman said the declaration was based on a vote which had been declared illegal and that the UK wanted to see the unity of Spain preserved.

“The UK does not and will not recognise the unilateral declaration of independence made by the Catalan regional parliament,” the spokesman said in a statement

“It is based on a vote that was declared illegal by the Spanish courts. We continue to want to see the rule of law upheld, the Spanish constitution respected, and Spanish unity preserved.”

READ MORE: Madrid poised to take over control of Catalonia after independence vote

The Scottish Government’s External Affairs Secretary Fiona Hyslop called for dialogue to end the crisis.

“We understand and respect the position of the Catalan government. While Spain has the right to oppose independence, the people of Catalonia must have the ability to determine their own future,” she said.

“Now, more than ever, the priority of all those who consider themselves friends and allies of Spain should be to encourage a process of dialogue to find a way forward that respects democracy and the rule of law.

“The imposition of direct rule cannot be the solution and should be of concern to democrats everywhere.”

Britain joined other leading international powers including the US, Germany and the EU in refusing to recognise the outcome of the Catalan independence vote.

READ MORE: Madrid poised to take over control of Catalonia after independence vote

The parliament in Barcelona backed the motion by 70 to 10, with the opposition boycotting the vote, plunging the country into a full-blown constitutional crisis.

The Senate in Madrid responded by approving measures allowing the Spanish government to impose direct rule over Catalonia.

Prime Minister Mariano Rajoy said: “Spain is a serious country, it is a great nation and we are not prepared in any way to allow some people to liquidate our constitution.”

It will be the first time in four decades of democratic rule in Spain that the national government will directly run the affairs of one of the country’s 17 semi-autonomous regions, a move that could fan the flames of the Catalan revolt.

READ MORE: Madrid poised to take over control of Catalonia after independence vote

Earlier Catalan president Carles Puigdemont hailed the independence vote, saying the parliament had fulfilled “the long-desired and fought-for step”.

“In the days ahead we must keep to our values of pacifism and dignity. It’s in our, in your hands, to build the republic,” he said.