Belgium and France will pay 5.5 billion euros (£4.4 billion) to take almost full control of Dexia in the hope this third bailout will be the last for the bank that was once the world's largest municipal lender.
Dexia, which at its peak had business across Europe and a large U.S. empire, had relied on long-term lending serviced with short-term borrowing, which dried up in the financial crisis.
The capital injection is the third attempt by Belgium and France to shore up the lender and end its troubles. It absorbed 6.4 billion euros in 2008 and was pulled apart last year.
The governments announced the move shortly before Dexia released third-quarter earnings showing a net loss for the first nine months of 2.39 billion euros, hit by writedowns related to asset sales. It lost 11.6 billion euros last year.
Belgian Finance Minister Steven Vanackere said it should be the group's last recapitalisation, but added: "Is it a total guarantee? People who give such a guarantee are unwise."
Dexia's third bailout serves as a warning for Spain and Greece to take decisive action to resolve their banking crises.
The size of bailouts can mount as losses on bad loans spiral, funding costs at troubled banks rise and costs go up for restructuring, asset sales and meeting state aid rules.
Ireland struggled to put its lenders on a firm footing until it implemented a March 2011 bailout that was its fourth attempt in two years to convince investors it had given banks enough capital to cope with more losses and halt an exodus of savers.
The money put into Dexia, classified as an investment rather than a cost, should not inflate Belgium's or France's deficits.
However, it will add to sovereign debt at a time of intense scrutiny of euro zone budgets. Belgium's national debt is already near 100 percent of annual economic output.
Belgium will sign over 2.92 billion euros, or 53 percent of the total capital, with France providing the remaining 2.59 billion euros, the Belgian and French ministries said.
In return they receive preference shares with voting rights, increasing their interest in Dexia to between 93 and 94 percent, Chief Executive Karel De Boeck told a news conference.
The group is currently majority-owned by public entities, although France and Belgium each own only 5.7 percent directly.
The bank has a total exposure of about 89 billion euros to France, 38 billion euros to Italy, 24 billion euros to Spain and 35 billion euros to the United States and Canada.
It has agreed to sell off most of its French arm for a nominal 1 euro. Dexia would be relieved of having to guarantee loans to French local authorities.
De Boeck said Dexia's balance sheet would be some 250 billion euros next year, dropping to around 50-60 billion euros by 2025. Barring a sudden intensification of the euro zone crisis, Dexia believes it can gradually run down its portfolio.
It says 88 percent of its bond and loan portfolio is investment grade and nothing should be called toxic. Defaults had so far been marginal, it said. "Dexia is not a bad bank, but a bank that does not have funding," De Boeck said.
Dexia said that as of the end of September it had a negative net asset position, mostly resulting from a writedown on the value of its holding in French arm Dexia Credit Local, prompting the need for fresh funds to stay in business.
As part of the deal, France and Belgium also agreed to readjust the division of guarantees to cover Dexia's borrowings.
In future, Belgium will take on 51.41 percent of these guarantees and France 45.59 percent. Previously the Belgian share had been 60.5 percent and that of France 36.5 percent. Luxembourg continues to back the remaining 3 percent.
The guarantees will be limited to a maximum of 85 billion euros, compared with 90 billion agreed a year ago.
Significantly, Dexia will in future pay the states a fee of just 5 basis points, compared with 95 bp now. Dexia had to pay fees of 725 million euros in the first nine months of 2012.
The plan needs approval from Dexia shareholders next month and the European Commission.
Dexia submitted a restructuring plan to the Commission in March, which envisages it pared down to a holding of bonds and outstanding loans, propped up by state guarantees.
French Finance Minister Pierre Moscovici told reporters the country now has a green light from Brussels to restructure Dexia's municipal finance unit, a key part of the rescue.
The plan calls for state bank Caisse des Depots et Consignations and the postal bank to take over those financing duties via a public bank dedicated to municipal lending, part of an effort to plug a funding gap for local entities.
The postal bank pledged on Thursday an extra 1 billion euros of long-term loans for local governments this year.
($1 = 0.7840 euros)
(Additional reporting by Robert-Jan Bartunek in Brussels, Steve Slater in London and Jean-Baptiste in Lyon; Editing by Erica Billingham)