BRUSSELS — European leaders, in a significant step toward resolving the euro zone financial crisis, early Thursday morning obtained an agreement from banks to take a 50 percent loss on the face value of their Greek debt.

The agreement on Greek debt was crucial to assembling a comprehensive package to protect the euro, which has been keeping jittery markets on edge.

The accord was reached just before 4 a.m. after difficult bargaining. The severe reduction would bring Greek debt down by 2020 to 120 percent of that nation’s gross domestic product, a figure still enormous but more sustainable for an economy driven into recession by austerity measures.

The leaders agreed on Wednesday on a plan to force the Continent’s banks to raise new capital to insulate them from potential sovereign debt defaults. But there was little detail on how the Europeans would enlarge their bailout fund to achieve their goal of $1.4 trillion to better protect Italy and Spain.