MADRID — Tens of thousands of protesters on Sunday called for the ouster of Prime Minister Pedro Sánchez of Spain and denounced his proposal for talks to try to ease the tensions around the simmering secessionist conflict in Catalonia.

The demonstration — held on one of the main squares of Madrid and convened by right-leaning parties under the slogan “For a united Spain, elections now!” — was the largest against Mr. Sánchez since his minority Socialist government took office in June.

The government’s proposal last Tuesday to appoint a rapporteur in talks among political parties to address the Catalan independence crisis has galvanized the opposition, which deems it a betrayal and a surrender to pressure from Catalan separatists.

The protest Sunday came two days before the start of a landmark trial of 12 Catalan separatist leaders, which is also likely to stir up emotions over a territorial conflict that remains at the top of Spain’s political agenda. The defendants are accused of rebellion and other crimes stemming from their declaration of their region’s independence in the fall of 2017.