E.U. also agreed to ease future bailout terms for nations following the rules.
BRUSSELS, BELGIUM - After tough all-night bargaining, European leaders appeared to salvage what had seemed to be a summit teetering toward failure by agreeing early Friday to use the continent's bailout fund to funnel money directly to struggling banks and in the longer term to the idea of a tighter union.
The bank decision at overnight meetings in Brussels was aimed at helping Spain, which sought a 100 billion euro rescue to help its troubled banks and wound up facing rising borrowing costs for the government.
European Council President Herman Van Rompuy called it a "breakthrough that banks can be recapitalized directly."
In addition, the leaders agreed that E.U. countries that were following budget rules could apply for bailouts that would not come with the stringent conditions that have accompanied previous E.U. bailouts -- a recognition of the work such countries were already doing in overhauling their budgets, said Italian Prime Minister Mario Monti, who pushed for the deal.
Monti said Italy did not intend to apply for a bailout.
Van Rompuy said the bailout agreement was important.
"We are opening the possibilities for countries that are well-behaving to make use of financial stability instruments, the EFSF and ESM, in order to reassure markets and get again some stability around some of the sovereign bonds of our member states," he said, referring to two bailout funds set up by the E.U. -- the European Financial Stability Facility and the European Stability Mechanism.
He said that meant there would not be any more countries struggling under the stern conditions that have been imposed on previous E.U. countries that received bailouts.
Van Rompuy said leaders of the 17-nation eurozone also agreed to a joint banking supervisory body. And he said the leaders of the full 27-member European Union agreed to a general long-term plan for a tighter budgetary and political union.
The importance of recapitalizing banks directly became evident when Spain asked for money for its shaky banks. Under current rules the bailout loan had to be made to the government, which would then lend it to the banks. But having that debt on the government's books spooked investors, who began demanding higher interest rates for lending money to the government.
The result was rates that would have been unsustainable in the long term. Lending the money directly to the banks would avoid putting that debt on the government's books.
The leaders agreed on "the four building blocks" of a tighter European Union -- but said they wouldn't start pinning down details until a report in October. The building blocks were laid out in a sweeping document presented by Van Rompuy and colleagues earlier this week that included sharing debt in the form of jointly issued eurobonds.
Van Rompuy said the report expected in October would be "a specific and time-bound road map for the achievement of a genuine economic and monetary union."
He did not say, however, whether the general agreement on the tighter union included a firm commitment on eurobonds from Germany.