MEMBERS of the Catalan Parliament are preparing to declare independence for the north-eastern Spanish state after filing a motion to hold a vote later today to establish a republic.

The motion from the ruling coalition Junts pel Si (Together for Yes) and their allies from the left-wing Popular Unity Candidacy (CUP) party reads: “We establish a Catalan Republic as an independent and sovereign state of democratic and social law.”

Lawmakers from both parliamentary groups have a majority that would in theory allow them to pass the motion during a vote later today, should it be allowed by the parliament’s advisory board.

The move is opposed by all the opposition parties, some of whom have said they will boycott the vote, and in Spain, where Prime Minister Mariano Rajoy is debating whether to sack the ruling Catalan coalition.

Thousands of demonstrators have gathered outside Ciutadella park in Barcelona, where Catalonia’s parliament is located.

Waving Catalan flags and chanting “independence” and “freedom”, the demonstrators are hoping to see the proclamation of a new independent state by the end of the day.

Rajoy earlier urged Spain’s Senate to grant unprecedented constitutional measures that would allow the Madrid government to take control of Catalonia's autonomous powers to try to halt the independence bid.

He told the chamber Spain was facing a challenge not seen in its recent history.

Rajoy said what was happening in Catalonia was “a clear violation of the laws, of democracy, of the rights of all, and that has consequences”.

He said the first move would be to sack Catalan President Carles Puigdemont and his ministers if the Senate approves the use of Article 155 of the constitution in a vote later today.

According to Rajoy, the special measures are the only way out of the crisis.