Catalan separatist leader Carles Puigdemont, who fled Spain over a failed 2017 independence bid, on Saturday exhorted tens of thousands of supporters to keep up the struggle, at a giant rally in southern France, near the Catalan border.

"We must prepare for the final combat, bypassing mistakes, doubts and weaknesses," he told the crowd at the exhibition centre of a city that many consider the capital of northern Catalonia.

Huge crowds thronged the venue bearing pictures of Puigdemont and waving separatist flags of an independent Catalonia.

Some of the tens of thousands of Catalan nationalists who turned out to hear Puigdemont speak
Some of the tens of thousands of Catalan nationalists who turned out to hear Puigdemont speak AFP / Raymond ROIG

Local authorities estimated the turnout at 100,000 while organisers put it at 150,000. Organisers had booked 600 buses for the event.

It was the first time the former Catalan president had ventured so close to the Spanish frontier since he fled to Brussels to escape prosecution following the failed secession bid that sparked Spain's worst political crisis in decades.

"We don't know what will happen but we know that if we maintain our positions the day will come when we can set foot on Catalan soil," he said, to cries of "Our president!"

He also called for a "permanent mobilisation" against "a monarchical regime which is a direct heir of Francoism," referring to Spain's longtime dictator General Franco, who restored the Spanish monarchy.

Catalan flags were prominent among the throng gathered to hear Puigdemont
Catalan flags were prominent among the throng gathered to hear Puigdemont AFP / LLUIS GENE

"We will not stop ... we just have good days ahead of us," Puigdemont promised.

On Friday evening, he attended a rugby match in Perpignan and was received by the mayor of the city, Jean-Marc Pujol.

Former French prime minister Manuel Valls, who made an unsuccessful bid to become mayor of Barcelona, Catalonia's main city, denounced the official reception accorded to Puigdemont, calling him a "political leader who fled Spain" and was a wanted figure in his country.

In October, nine other separatist leaders who remained in Spain were sentenced to heavy jail terms for sedition, sparking weeks of angry protests in Catalonia, some of which turned violent.

European Member of Parliament and former Catalan president Puigdemont called for the fight for Catalan independence to continue
European Member of Parliament and former Catalan president Puigdemont called for the fight for Catalan independence to continue AFP / LLUIS GENE

Previously Puigdemont had not risked travelling to France, where police and the courts work closely with Madrid. But that changed recently when he was granted immunity as a member of the European parliament.

"For me, it's like being home," Puigdemont told a local newspaper ahead of his visit.

The rally comes at a sensitive time for Catalonia where Puigdemont's successor, Quim Torra, has announced early regional elections due to a clash between the two separatist parties that run the wealthy northeastern part of Spain.

One is Puigdemont's Together for Catalonia (JxC) while the other is the Republican Left of Catalonia (ERC), which is headed by his former deputy Oriol Junqueras, who is currently serving 13 years in prison over the failed independence bid.

The tensions stem from strategic differences over how to advance the separatist agenda, with both parties struggling for leadership of the independence movement.

And while ERC has pushed for dialogue with the government of Spain's Socialist Prime Minister Pedro Sanchez, JxC has favoured a more confrontational approach.

This week, Sanchez opened talks with Catalonia's regional leaders to try to resolve the separatist conflict.

The negotiations were agreed as part of a deal with ERC in exchange for its support in getting Sanchez through a key investiture vote in January -- a deal that was frowned upon by Puigdemont and his supporters.

"Experience has taught very clearly not to trust," he said recently, despite asking to be a part of the ongoing dialogue with Madrid.