Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

Spanish Prime Minister Mariano Rajoy's decision to fire Catalonia's government and force a new election is a "coup" and an "attack against democracy", the speaker of the Catalan parliament said Saturday.

"Prime Minister Rajoy wants the parliament of Catalonia to stop being a democratic parliament, and we will not allow this to happen," Carme Forcadell said in a televised speech.

"This is why we want to send to the citizens of this country a message of firmness and hope," she said. "We commit today, after the most serious attack against the Catalan institutions since they were restored, to the defense of the sovereignty of the parliament of Catalonia."

Spanish Prime Minister Mariano Rajoy addresses the press after an extraordinary cabinet meeting in Madrid, Spain, on Saturday. Pablo Blazquez Dominguez / Getty Images

Rajoy said earlier Saturday that he would take control of Catalonia, remove its leader, Carles Puigdemont, from power and call an election within six months in a bid to thwart a drive by the autonomous province to breakaway from Spain.

Using a previously untapped constitutional article, Rajoy proposed that the powers of the Catalan officials be taken over by central government ministers.

The prime minister's cabinet was meeting to outline the scope and timing of the measures the government plans to take under Article 155 of the Spanish Constitution. The section allows central authorities to intervene when one of Spain's 17 autonomous regions fails to comply with the law.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Related: Spain Set to Impose Direct Rule on Catalonia Beginning Saturday

It's never been used since the 1978 Constitution was adopted, but Rajoy's conservative government says establishing direct control over Catalonia was a move of last resort.

The prime minister said his government had taken this unprecedented decision to restore the law, make sure regional institutions were neutral, and to guarantee public services and economic activity as well as preserve the civil rights of all citizens.

The measures must now be approved by Spain's upper house, the Senate, where a vote is scheduled for Oct. 27.

The announcement was expected to spark angry opposition from supporters of independence and moderate Catalans who will see them as an attack on their autonomy.

The slow-burning constitutional crisis over secession escalated this month when regional government officials claimed a disputed independence referendum held Oct. 1 gave them a legal basis for separating from Spain.

More than 40 percent of Catalonia's 5.5 million eligible voters cast ballots in the illegal referendum as police used violence to try to enforce a court order to stop it from going ahead. Opponents boycotted the vote.

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 country's Constitutional Court has so far ruled against all moves toward secession, including the controversial referendum.

A spokeswoman for the court said Saturday that its website had been affected by a cyberattack of unknown origin. The attack came as social media accounts linked to the Anonymous hacktivist group had launched a campaign to "free Catalonia."

The spokeswoman said it only affected the court's website and no internal information was compromised. She requested anonymity in line with internal rules.

Spain's National Security Department said late on Friday that an undisclosed number of government websites had been hit in recent weeks with slogans supporting independence for the country's Catalonia region.

In a YouTube video posted by an account linked to Anonymous, the group announced actions that would be rolled out on Saturday as part of an "Operation Free Catalonia."