The stronger Podemos looks, the more its opponents try to link the party to Venezuela, where the economy is collapsing and Mr. Maduro’s increasingly authoritarian government has declared a state of emergency. The message is meant to be scary and clear: Venezuela is a mess, and it can happen here.

“One of the four parties that is competing in the campaign in Spain was hosted and formed in Venezuela, so if they want to bring that model here, they have to explain why,” Albert Rivera, the leader of Ciudadanos, an emerging center-right party, told a group of foreign correspondents this month, shortly after returning from Venezuela. “It is Podemos which brought Venezuela to Spain, not us.”

The leader of Podemos, Pablo Iglesias, fired back in a televised debate that his opponents were ignoring the issues that could really affect Spain, starting with a possible British exit from the European Union.

Podemos had its first electoral success in May 2014, when it won 8 percent of the votes in European Parliament elections. In its early days, Podemos looked to Syriza, the Greek party that came to power in early 2015, as an example of how a new and far-left party could overhaul the political establishment.

Podemos may be poised to do just that. After recently forming an alliance with a radical party, United Left, it could now leapfrog over the Socialists into second place, behind the conservative Popular Party of the caretaker prime minister, Mariano Rajoy, according to recent opinion polls. Such an outcome would overturn the two-party political order that has prevailed since Spain’s return to democracy in the late 1970s.