The measures early on Saturday came after the Catalan parliament voted to declare independence on Friday.
An official state bulletin dismissed Catalan leaders and handed control of Catalonia to Spain's Deputy Prime Minister, Soraya Saenz de Santamaria.
Earlier, Spain's interior ministry took charge of Catalonia's police after firing senior Catalan police officials.
On Friday, PM Mariano Rajoy announced the dissolution of the regional parliament and the removal of the Catalan leader, and called snap local elections.
Demonstrations for and against independence went on into the night.
More are expected on Saturday, with a rally "for the unity of Spain and the constitution" to be held in Madrid.
The crisis began when Catalan leaders held an independence referendum, defying a ruling by the Constitutional Court which had declared it illegal.
The Catalan government said that of the 43% of potential voters who took part, 90% were in favour of independence. Others boycotted the vote after the court ruling.
What are the latest developments?
On Friday afternoon, the Catalan regional parliament voted to declare independence from Spain.
Soon after, the Spanish Senate granted Mr Rajoy's government the power to impose direct rule on Catalonia.
It did so early on Saturday by publishing an official bulletin (in Spanish) that dismissed Catalan leader Carles Puigdemont and all government members.
The announcement came hours after the Madrid government removed Josep Lluís Trapero Álvarez as chief of Catalonia's autonomous Mossos police force.
Mr Trapero was already under investigation for sedition, accused of failing to help Spain's Guardia Civil police tackle thousands of pro-independence protesters in Barcelona during the run-up to the referendum.
Pere Soler i Campins, the Mossos director general, has also been dismissed.
"[Mr Puigdemont] had the opportunity to return to legality and to call elections," Mr Rajoy said.
"It is what the majority of the Catalonian people asked for - but he didn't want to do it. So the government of Spain is taking the necessary measures to return to legality."
Regional elections are scheduled for 21 December.
Mr Puigdemont urged supporters to "maintain the momentum" in a peaceful manner. Spanish prosecutors say they will file charges of "rebellion" against him next week.
Separatists say the independence move means they no longer fall under Spanish jurisdiction.
But the Spanish Constitutional Court is likely to declare it illegal, while the EU, the US, the UK, Germany and France all expressed support for Spanish unity.
IF I HAD UNDERSTOOD THE SITUATION A BIT BETTER I SHOULD HAVE PROBABLY JOINED THE ANARCHISTSGeorge Orwell