German MPs backed the plan by an overwhelming majority
Germany's parliament has backed what has been billed as the largest financial rescue package in Germany's post-war history.
Up to 500bn euros ($670bn; £387bn) will be used to pour fresh money into banks and to guarantee loans between them.
The measures were passed overwhelmingly in the lower house and then unanimously in the upper house.
The plan was rushed through and is expected to be signed into law by the president later on Friday.
Germany's Economy Minister Michael Glos said the move was crucial not just for the banks, but primarily for "the good of citizens and the economy".
"Everything must be done to restore confidence" in the financial sector, he said.
Germany has been hit by a stream of data suggesting its economy is grinding to a halt.
Its own forecasts suggests 2009 will see growth of no more than 0.2%.
The German banking system has not been hit as badly as some others by the global credit crisis.
But the predicament of the major German lender Hypo Real Estate, which had to be bailed out because of its heavy dependence on interbank loans, convinced the government it had to act.