In signing on to the deal, however reluctantly, Mr. Tsipras suddenly found himself the champion of policies he was elected to oppose and the best hope for de-escalating a crisis he had helped create. Should he succeed in carrying out the policies set out in the agreement, he would oversee just the kind of market-based changes that creditors have been demanding and successive Greek governments have been failing to deliver for years.

As the talks ended in Brussels, Mr. Tsipras, who had once vowed to overturn the austerity policies he says have undercut the Greek economy and left its people suffering, was no longer talking of “blackmail” by creditors or “hostage taking.” Instead, he said the new package of proposals would “maintain Greece’s financial stability and provide recovery potential.”

To Germany and other nations that went into the negotiations fed up with Greece’s inability to stabilize its economy, the outcome was fair and the new requirements necessary to assure that the Athens government lives up to its commitments. But to some Greeks, and to critics of the German-led policy of imposing deep budget cutting as a condition for aid, the deal amounted to an unwarranted violation of Greece’s sovereignty.

Either way, it appeared to remove the immediate threat of Greece’s financial crisis escalating to the point that the country might be forced to abandon the euro as its currency. By Monday afternoon, the European Central Bank had signaled that it would maintain its credit line to Greece at its current level, leaving the banks, which have been closed for two weeks, in severe distress but with a chance to muddle through until a bailout deal can be completed.