By Isla Binnie

MADRID (Reuters) - The Spanish cabinet was meeting on Saturday to prepare to impose direct rule on Catalonia and thwart a drive by the autonomous region to breakaway from Spain.

It will be the first time in Spain's four decades of democracy that Madrid has invoked the constitutional right to take control of a region and rule it directly from Madrid.

Independence supporters were due to rally in the Catalan capital Barcelona on Saturday afternoon.

Prime Minister Mariano Rajoy insists that Catalan leader Carles Puigdemont, who heads the wealthy northeastern region's government, has broken the law several times in pushing for independence, thus justifying the imposition of central government control.

Direct rule would be temporary and could range from dismissing the regional government to a softer approach of removing heads of specific departments.

The exact measures must be agreed and voted upon in Spain's upper house, the Senate, and Rajoy wants the broadest consensus possible.

The main opposition Socialists said on Friday they would back special measures and had agreed on the holding of regional elections in January.

The government declined to confirm this, saying only that regional elections were likely and the details would be announced on Saturday.

Rajoy received the backing of the head of state, King Felipe, on Friday, who said at a public ceremony that "Catalonia is and will remain an essential part" of Spain.

"Spain needs to face up to an unacceptable secession attempt on its national territory, which it will resolve through its legitimate democratic institutions," said the king, a ceremonial figure who had criticized Catalan leaders earlier this month.

The independence push has brought on Spain's worst political crisis since a failed military coup in 1981 several years after the end of the Franco dictatorship. It has met with strong opposition across the rest of Spain, divided Catalonia itself, and raised the prospect of prolonged street protests

It has also led Madrid to cut economic growth forecasts and prompted hundreds of firms to move their headquarters from Catalonia. Spain has the euro zone's fourth-largest economy and Catalonia accounts for a fifth of it.

Pro-independence groups have mustered more than one million people onto the streets in protest at Madrid's refusal to negotiate a solution. Heavy-handed police tactics to shut down a an independence referendum on Oct. 1 that the government had declared illegal drew criticism from human rights groups.

Regional authorities said about 90 percent of those who cast ballots voted for independence. But only 43 percent of voters participated and opponents of secession mostly stayed home.

Activist organizations ANC and Omnium have called on their supporters to rally at 1500 GMT in Barcelona, the region's principal city, in protest at the jailing of their leaders over sedition accusations.

(Editing by Julien Toyer and Angus MacSwan)