MADRID — For 20 years, Luis Bárcenas toiled in obscurity for Spain’s governing Popular Party, working as a bookkeeper and treasurer. These days when he walks the streets of Madrid in his signature chesterfield coat, strangers lash out at him with just one word: “Envelope!”

While Spaniards suffer with the sacrifices of government-imposed austerity, Spain’s top politicians, including Prime Minister Mariano Rajoy, have been accused in a widening scandal of pocketing envelopes of cash sometimes amounting to nearly $35,000 a year for nearly two decades. Mr. Bárcenas is suspected of distributing the illicit payments in an elaborate scheme to finance the party and enrich its leadership.

Having started as a low-level case, the scandal has now reached the very top of the political pyramid, with fresh disclosures emerging almost daily, directly threatening Mr. Rajoy’s government and rattling financial markets. It has fueled public anger among Spaniards — like their southern European counterparts in Greece and Italy — who have seen traditions of institutionalized graft exposed by the downturn in Europe’s economy.

The scandal has also shined an uncomfortable light on how the political parties operate and their clubby relations with a corporate elite in an alliance that stifles competition throughout the economy — to the detriment of the middle and lower classes.