Spanish Prime Minister Mariano Rajoy said on Saturday he would not rule out using the constitutional powers to remove Catalonia's autonomous status if it claimed independence as tens of thousands took to the streets to call for talks.

The wealthy northeastern region of Catalonia, with its own language and culture, held a referendum on Oct. 1 on independence, in defiance of the Spanish constitutional court which had ruled the vote illegal.

Until now, Rajoy has remained vague on whether he would use article 155, the so-called nuclear option, of the constitution which enables him to sack the regional government and call a fresh local election.

In an interview with Spanish newspaper El Pais on Saturday Rajoy was asked if he was ready to trigger the article 155 of the constitution, and said: "I don't rule out absolutely anything that is within the law ... Ideally, it shouldn't be necessary to implement extreme solutions but for that not to happen things would have to be changed."

Tens of thousands of people gathered across Spain earlier on Saturday as Catalonia prepared to declare independence from the rest of the country, many dressed in white and calling for talks to defuse Spain's worst political crisis for decades.