BERLIN — Just weeks ago, the idea that Greece would leave the euro zone was almost unthinkable. Now, with Greece’s newly empowered political parties refusing to abide by the terms of the country’s international loan agreement and Europe’s leaders talking tough, that outcome is looking increasingly likely.

Germany’s devotion to the euro and the European Union runs extremely deep and cuts across the political spectrum. But the frustration with Greece here is undeniable. There is a growing conviction that it is up to Greece to follow through on its commitments, that Europe is done negotiating.

“Germans are now predominantly of the opinion that they would be better off if Greece left the euro zone,” said Carsten Hefeker, a professor of economics and an expert on the euro at the University of Siegen. “If the country really is continuing on the path they are taking now, it would be hard to justify keeping them in. How do you deal with a country that says we don’t want to keep any of the commitments we have made?”

Yet, on Tuesday, the leader of the leftist Greek party that won the second-most votes in Sunday’s elections declared the loan agreement “null,” and refused to enter a coalition with the formerly dominant parties that supported it. With the so-called troika of lenders — the European Union, the European Central Bank and the International Monetary Fund — demanding budget savings of $15 billion by the end of June, the issue seems likely to come to a head soon.