Spanish Prime Minister Mariano Rajoy said Sunday he wanted to return to a "democratic and free" Catalonia as he aimed to rally support for a unified Spain on his first visit to the turbulent region since it declared independence.

A day after hundreds of thousands of people marched in Barcelona to demand the release of separatist officials detained over their independence drive, Rajoy also urged businesses not to flee the wealthy northern region.

"We have to recover the sensible, practical, enterprising and dynamic Catalonia... that has contributed so much to the progress of Spain and Europe," Rajoy told members of his Popular Party in Barcelona.

"We want to regain a Catalonia for everyone, democratic and free," he added.

The Catalonia crisis has caused concern in the European Union as the bloc deals with Brexit and uncertainty over the fate of the region's 7.5 million people. More than 2,400 businesses have moved their legal headquarters elsewhere.

Rajoy on Sunday urged those businesses "not to go".

"Rumours" Catalan leaders "will be out of jail before the elections" - Robert Lineira, research fellow, Edinburgh University

Deeply divided Catalonia

Separatist lawmakers, who were dismissed by Madrid after declaring their region independence from Spain last month, insist that they were given a mandate for secession by a banned October 1 referendum.

However, pro-unity camps say that the vote was deeply flawed and largely boycotted by opponents of independence, though more than 90 percent of those who turned out backed a breakaway.

Several officials have been detained over their role in pushing for independence, which is outlawed under Spain's post civil-war constitution.

The region -- which accounts for a fifth of Spanish GDP -- remains deeply divided on independence and Barcelona´s mayor on Saturday slammed separatist lawmakers for dragging Catalonia into chaos.

A poll commissioned Sunday by the Madrid-based El Pais daily showed that less than a third of Catalans now believed independence was possible in the near future.

The 28 percent of respondents who said they thought swift secession was viable was down sharply from a similar poll in October.

Rajoy has used his powers as head of Spain's central government to dismiss Catalan lawmakers, suspend the region's autonomy and call for fresh regional elections on December 21.

The prime minister, who attended a presentation by a party candidate at hotel in Barcelona, did not appear in public.

Rajoy's Party Popular won only 8.5 percent in Catalona's last election two years ago that saw pro-independence parties sweep to power.

'Independence is toxic'

His candidate Xavier Garcia Albiol on Sunday said events since the October 1 referendum showed that "independence is toxic and is destroying Catalonia."

Eight ministers under Catalan ex-leader Carles Puigdemont have been detained on charges of sedition, rebellion and misuse of public funds. Two heads of pro-independence lobby groups are also behind bars.

Six former parliamentarians were granted bail last week by Spain's Supreme Court on similar charges.

Local police said 750,000 people turned out in Barcelona on Saturday to demand the release of detained officials.

The demonstrators gathered on an avenue next to the regional parliament building waving Catalan independence flags and chanting "Freedom!" while some held up banners announcing: "SOS Democracy".

Children in riding helmets climbed castells -- the region's traditional human towers -- as others held placards bearing caricatures of some jailed lawmakers.

"The situation is sad, the politicians haven't done their jobs," said Robert Muni, who was protesting with his children, although some protesters shouted their support for Puigdemont, "our president".

But Barcelona's charismatic mayor, Ada Colau, on Saturday slammed the behaviour of Puigdemont and his former ministers.

"They've provoked tensions and carried out a unilateral independence declaration which the majority do not want," Colau told a meeting of her party members hours before Saturday's march.

"They've tricked the population for their own interests."

Puigdemont himself is in self-imposed exile in Brussels and is due to appear before a judge next week after Spain issued a EU-wide warrant for his extradition.