The package to rescue the country's fourth biggest bank came after a weekend of intensive negotiations.
On top of a public-private deal last month to extend a €35 billion credit line to the bank, the financial sector will offer an additional €15 billion, the ministry said in a statement.
"With this mutually agreed solution, the institution will be stabilised and with it, Germany strengthened as a place to conduct finance in difficult times," it said.
Speaking to reporters before the deal was announced, Chancellor Angela Merkel said the government was "pulling out all the stops" to save stricken Hypo Real Estate (HRE) after a banking consortium withdrew from a €35 billion ($48 billion) rescue plan late on Saturday.
"The government says today that we will not allow an institution's crisis to become a crisis for the entire system," the conservative leader said.
But hitting back at accusations that the government is preparing to bail out fat cats at average citizens' expense, Merkel warned that "those who did irresponsible business will be held accountable".
"We owe that to the taxpayers in Germany," she said.
In a further move to shore up the German banking system, the government issued a guarantee for all savings in German banks.
In a bid to head off panic withdrawals, Finance Minister Peer Steinbrueck assured that German bank account holders need not worry about losing a "single euro" in the crisis.
"That is an important message intended to create calm and not reactions that would be disproportional and make the current crisis management and crisis prevention even more difficult," he said, flanked by Merkel at the chancellery.
Business daily Handelsblatt said in an advance copy of its Monday issue that the value of the guaranteed savings and checking accounts would total €568 billion.