Thousands of Spaniards joined a rally in Madrid to demand that socialist Prime Minister Pedro Sanchez step down.

Many in the crowd gathered in the capital’s Plaza de Colon, waving Spanish flags. They chanted slogans in favour of the nation’s security forces and for Mr Sanchez to resign.

Pedro SanchezThere are calls for Pedro Sanchez to resign (AP Photo/Marco Ugarte)

The conservative opposition Popular Party and the centre-right Citizens party organised the rally, which was also backed by the upstart Vox and other marginal parties.

They claim that Mr Sanchez must resign for holding talks with separatists in the north-eastern region of Catalonia.

“The time of Mr Sanchez’s government is over,” said Popular Party president Pablo Casado, who asked voters to punish Mr Sanchez’s Spanish Socialist Workers’ Party in upcoming European, local and regional elections in May.

Thousands of demonstrators protest in Madrid Thousands of demonstrators protest in Madrid (AP Photo/Andrea Comas)

The political tensions come as a highly sensitive trial at Spain’s Supreme Court starts on Tuesday for 12 Catalan separatists who face charges, including rebellion, for their roles in a failed secession attempt in 2017.

Mr Sanchez inherited the Catalan crisis from former prime minister Mariano Rajoy, the then-leader of the Popular Party. Mr Rajoy proved incapable of stopping support for secession from swelling in Catalonia to roughly half of the region’s voters.

Mr Sanchez came to power in June promising to thaw tensions between central authorities in Madrid and the Catalan leaders in Barcelona. He has met twice with Catalan chief Quim Torra and members of both governments had several more encounters.

Demonstrators hold banners and Spanish flagsDemonstrators chanted slogans in favor of the nation’s security forces (AP Photo/Andrea Comas)

Mr Sanchez had said he would be willing to help Catalan politicians agree to a new Charter Law, which determines the amount of self-rule the region enjoys. But Mr Sanchez’s government broke off negotiations on Friday, when vice president Carmen Calvo said the separatists would not budge from their demand for an independence referendum.

Mr Sanchez is trying to cobble together support to pass a national budget and will need votes from the Catalan separatists to pass it.

Even though Mr Sanchez has said he wants to see out the legislative term to 2020, a failure to win a budget vote will crank up the pressure on him to call for an early election.