Spain has announced it will impose direct rule over Catalonia, after the region's leaders failed to meet a deadline to withdraw a declaration of independence.

The government of Mariano Rajoy will trigger article 155 of the constitution, withdrawing Catalonia's right to govern itself, in a cabinet meeting on Saturday, the Prime Minister's Office said.

It came after Catalan president Carles Puigdemont wrote a letter to Mr Rajoy, minutes before a deadline on Thursday morning to clarify Catalonia's position, stating the Catalan parliament could vote on a full declaration of independence from Spain if Madrid did not agree to new talks.

In his letter, Mr Puigdemont accused the Spanish government of obstructing progress. He said that if Madrid continued to "impede dialogue and continues its repression", Catalonia would proceed to a formal declaration.

The Prime Minister's Office responded by saying the government would hold the special Cabinet meeting and "approve the measures that will be sent to the Senate to protect the general interest of all Spaniards".

The measure falls under article 155 of Spain's 1978 Constitution, but has never been used in the four decades since democracy was restored at the end of General Francisco Franco's dictatorship.

Catalans have previously described the imposition of direct rule as an "invasion" of the region's self-government, while Spain's central authorities are portraying it as an undesired move, yet a necessary one, to restore legality after Mr Puigdemont's government pushed ahead with a banned referendum that violated the country's constitution.

Spain's highest court, which delayed judgement in the run-up to the 1 October vote, this week confirmed it was illegal under the 1978 constitution which restored democracy at the end of General Francisco Franco's fascist dictatorship.

The vote went ahead anyway, even as police used violence to try and enforce a court order against it. Regional officials say more than 40 per cent of Catalonia's 5.5 million eligible voters cast ballots and that the vote went 90 per cent in favour of independence.

Catalan officials say that hundreds of people were injured in police violence, while Spanish authorities say hundreds of police officers were also hurt and the use of force was proportional to the resistance they met.

The separatists declared an overwhelming victory despite the boycott by opponents, who stayed away on the grounds that it was illegal and lacked basic guarantees such as an independent electoral board.

Spain's government has said it would be willing to hold off on applying article 155 if the Catalan separatist leader were to call a snap regional election. But Catalan officials have ruled that out.

Catalonia independence referendum: Riot police clash with voters Show all 17 1 /17 Catalonia independence referendum: Riot police clash with voters Catalonia independence referendum: Riot police clash with voters A man faces off Spanish Civil Guards outside a polling station in Sant Julia de Ramis Reuters Catalonia independence referendum: Riot police clash with voters Riot police form a security cordon around the Ramon Llull school in Barcelona EPA Catalonia independence referendum: Riot police clash with voters Riot police evict a young woman during clashes between people gathered outside the Ramon Llull school in Barcelona EPA Catalonia independence referendum: Riot police clash with voters Spanish Civil Guard officers break through a door at a polling station in Sant Julia de Ramis Reuters Catalonia independence referendum: Riot police clash with voters Spanish National Police clash with pro-referendum supporters in Barcelona on Sunday AP Catalonia independence referendum: Riot police clash with voters Crowds raise their arms up as police move in on members of the public gathered outside to prevent them from voting in the referendum at a polling station where the President Carles Puigdemunt will vote later today Getty Catalonia independence referendum: Riot police clash with voters People confront Spanish Civil Guard officers outside a polling station Reuters Catalonia independence referendum: Riot police clash with voters Three man hold each other as they try to block a Spanish police van from approaching a polling station AP Catalonia independence referendum: Riot police clash with voters A woman shows a ballot to a Spanish Civil Guard officer outside a polling station Reuters Catalonia independence referendum: Riot police clash with voters A man wearing a shirt with an Estelada (Catalan separatist flag) and holding carnations faces off with a Spanish Civil Guard officer Reuters Catalonia independence referendum: Riot police clash with voters Police try to control the area as people attempt to cast their ballot at a polling station in Barcelona Getty Catalonia independence referendum: Riot police clash with voters A man is grabbed by officers as police move in on the crowds Catalonia independence referendum: Riot police clash with voters Two women argue with a Spanish National policeman during clashes between Catalan pro-independence people and police forces at the Sant Julia de Ramis sports centre in Girona EPA Catalonia independence referendum: Riot police clash with voters Sant Julia De Ramis in Spain Getty Catalonia independence referendum: Riot police clash with voters Confrontation outside a polling station in Barcelona, where police have tried to stop people voting AFP/Getty Images Catalonia independence referendum: Riot police clash with voters A Spanish National Police officer aims a rubber-bullet rifle at pro-referendum supporters in Barcelona AP Catalonia independence referendum: Riot police clash with voters Riot police clashed with voters as polls opened in Barcelona Sky News

The Catalan government's international affairs director, Raul Romeva, told reporters in Brussels that Catalonia's banned 1 October secession referendum gave the region's separatist government a mandate to declare independence from Spain.

PDeCAT's coordinator Marta Pascal said that the only election on the table would be a vote to elect a constituent assembly in the next few months once the path to independence gets under way.

"We need to defend what Catalan political nationalism has created over the years," Ms Pascal told reporters. "We need to defend our institutions, language, culture, schools and regional police."

What is Article 155?

Article 155 of Spain's Constitution allows for central authorities to take over the semi-autonomous powers of any of the country's 17 regions, including Catalonia.

The measure has never been used in the four decades since the end of General Franco's rule.

The article grants the national government the right to "take all measures necessary" to force a region to meet its obligations to the wider state, if it is deemed to have acted in any way to undermine the interests of Spain.

President of Catalonia says they have earned the right to independence

Spain's government needs to outline the exact measures it wants to apply in Catalonia and submit them for a vote in Spain's Senate.

The exact wording of Article 155 is as follows: "If a self-governing community does not fulfill the obligations imposed upon it by the constitution or other laws, or acts in a way that is seriously prejudicial to the general interest of Spain, the government, after having lodged a complaint with the president of the self-governing community and failed to receive satisfaction therefore, may, following approval granted by the overall majority of the senate, take all measures necessary to compel the community to meet said obligations, or to protect the above mentioned general interest.