BRUSSELS — Working through the night in the face of pressure from the embattled euro zone countries Italy and Spain, European leaders agreed early Friday to use the Continent’s bailout funds to recapitalize struggling banks directly, according to the European Council president, Herman Van Rompuy.

Financial markets, which had expected little from the meeting, welcomed the announcement, suggesting it had exceeded expectations — though analysts cautioned that earlier summit agreements had prompted rallies that proved short-lived.
The decision, by leaders of the 17-nation euro zone, would allow help to banks without adding directly to the sovereign debt of countries, which has been a problem for Spain and potentially for Italy. Both countries have seen the interest rates on their debt rise to levels that would be unsustainable in the long term, and the Italian and Spanish prime ministers, Mario Monti and Mariano Rajoy, came here to push their colleagues to help.
Late Thursday, they said they would block all other agreements — on a 130 billion euro or $163 billlion growth pact for example — until their colleagues did something to help take the pressure off the third- and fourth-largest economies in the euro zone.
If their countries could not go to the markets to roll over their debt, Mr. Monti and Mr. Rajoy argued, there would be an existential threat to the euro in the short to medium term.
Spain is seeking 100 billion euros to recapitalize its banks, damaged by a property bubble.
Mr. Van Rompuy called the agreement a “breakthrough that banks can be recapitalized directly,” which represents a concession by northern European countries, including Germany.
The leaders agreed that the euro zone’s permanent bailout fund, the 500 billion euro European Stability Mechanism, due to come into being next month, could recapitalize banks directly once a banking supervisory body overseen by the European Central Bank has been set up. That should happen by the end of the year, he said.
The joint banking supervisory body is also a breakthrough, an effort to ensure the future health of the area’s banks, but details about that component of the agreement were scarce.
François Hollande, the French president, said Friday that the agreement offered a number ways to give troubled economies the rapid assistance that had had been seeking.
“It’s very important that we put into motion procedures for immediate action — that was something much hoped for,” he said. “Bank supervision for a recapitalization of the banks will take a bit more time, but this is a move in the right direction.”
“To have defined a vision for the economic and monetary union” was a fundamental step toward answering the question “what we do we want to do together,” Mr. Hollande said.
Graham Neilson, chief investment strategist at Cairn Capital, an asset management and investment company in London, noted that while the agreement represented some progress, some fundamental issues were not addressed.
“The burden of future risk is being shared more widely, meaning the chances of a euro zone breakup have been lowered for the short term,” he said. “But at the same time, the longer-term ante is higher for all involved and the root causes of the structural imbalances remain.”
The Euro Stoxx 50, a measure of European blue chips, was up 2.09 percent in late morning trading in Europe. National indexes were also up, most by more than 2 percent. Asian stock markets also rose.
The interest rate on 10-year Spanish bonds was at 6.572 percent, down 0.275 percentage points. The comparable Italian bond was at 5.963 percent, down 0.207 points.
The euro was at $1.2574, up from $1.2430 late Thursday in New York.
Mr. Van Rompuy said the euro zone would make more “flexible” use of the existing bailout funds for “well-behaving nations” in order “to reassure markets and to get again some stability around the sovereign bonds of our member states.” There would be unspecified conditions attached to this use of the bailout funds, he said, but it would not require a special adjustment or austerity program.
Mr. Monti, an experienced European player and former European Union commissioner, hailed the agreement as a “very important deal for the future of the E.U. and the euro zone,” adding, “it is a double satisfaction for Italy.” He had argued that other euro zone leaders must find ways to help “virtuous countries” like his own and Spain, he said, which were fixing their economies and were solvent, but were under speculative market pressure.
Countries that request bond support from the rescue fund will have to sign a memorandum of understanding setting out their existing policy commitments and agreeing to a timetable. But they will not face the intrusive oversight of a “troika” of international leaders to which Greece, Ireland and Portugal have been subjected, Mr. Monti said.
The euro zone “will be strengthened by this,” Mr. Monti said, calling it a step on the path to collective responsibility and mutualized debt. The decision also opened the way to agreement on the growth pact, and the euro rose in early trading in Asia on the news.
Italy has no immediate plans to ask for help from the existing funds, Mr. Monti said, on the assumption that markets would ease after this agreement. For Spain, help from the temporary bailout funds will be transferred to the permanent one once it is set up, Mr. Van Rompuy said.
The decision followed a difficult afternoon and night of discussions, after most leaders of countries who do not belong to the euro zone had left Brussels.
Italy and Spain were supported in their efforts by Mr. Hollande, who arrived here on Thursday demanding “rapid solutions” to the euro’s problems. But Chancellor Angela Merkel of Germany gave little sign of budging on any quick fixes, arguing that existing mechanisms could be used, illustrating some of the deep divisions as European leaders try to restore faith in the single currency.
European Union summit conferences were once scripted by the governments in Paris and Berlin, which often dictated the course by releasing a “Franco-German letter” just before other leaders arrived. But despite repeated meetings in recent days, there had been no far-reaching French-German proposal, which the two leaders promised on the day six weeks ago that Mr. Hollande became president.
Ms. Merkel has given Mr. Hollande the growth pact that he demanded during his election campaign, but it is largely made up of existing funds. There had been little effort to disguise their differences over sharing liability, through collectivized debt, to avert a euro zone breakup and take the pressure off Spain and Italy.
“The current disconnect between Paris and Berlin is destabilizing the euro,” Charles Grant, the director of the Center for European Reform, a research organization in London, wrote this week. “In the long run the euro is not sustainable without a grand bargain between France and Germany.”
Approval of the growth pact was delayed by disagreements ranging from the mundane — disputes over a European patent office — to the more fundamental, with Italy and Spain insisting on a more urgent discussion of short-term measures to ease their financial strains. Mr. Monti told the other leaders that Italy would not agree to any other issue here until there was serious discussion of how the union could help bring down interest rates on Italian bonds, and Mr. Rajoy, under even more pressure from the markets, joined him.
While she made a concession Friday for the use of the bailout fund, it was accompanied by the requirement for a centralized banking supervisor, to ensure more bloc-wide discipline.
Financial markets have been looking ahead to the next meeting of the European Central Bank amid speculation that it would be forced to step in with new funds again or slash interest rates.
The central bank, however, indicated that it would not make any move until it saw concrete progress on the political side.
“How the E.U. summit pans out will be a key influence on what the E.C.B. opts to do,” Kenneth Wattret, an economist at BNP Paribas, wrote in a research note.
James Kanter in Brussels, Melissa Eddy in Berlin, David Jolly in Paris and Stephen Castle in London contributed reporting.