ATHENS — After a period of relative calm, European markets shuddered once again on Wednesday as protests erupted across Greece and demonstrators surrounded the Spanish Parliament for a second day to protest the austerity program of Prime Minister Mariano Rajoy.

Earlier this month, the European Central Bank announced its intention to buy unlimited quantities of debt from European nations, including the troubled economies of southern Europe. That kept the peace in the financial markets until Wednesday, when political instability startled investors, with the Spanish stock market dropping 3.9 percent and even the German DAX falling by 2 percent. The interest rate on the 10-year Spanish bond, which had been declining, inched closer to the ominous 6 percent level.

On Tuesday in Spain, tens of thousands of demonstrators besieged Parliament to protest austerity measures planned by Mr. Rajoy. Last week, more than half a million people marched in cities across Portugal to protest an increase in social security contributions, and a million marched in Barcelona calling for Catalan independence.

In Athens, trade unions called a nationwide strike Wednesday to contest billions of dollars in new salary and pension cuts being discussed by the government and its international creditors. It was the first such walkout since a conservative coalition led by Prime Minister Antonis Samaras came to power in June.