The package, which modifies Germany's constitutionally enshrined debt brake, needed a two-thirds majority to pass and was approved by 53 of the Bundesrat's 69 members, after it cleared the lower house on Tuesday.
The package is the brainchild of the incoming government of the likely next chancellor Friedrich Merz, whose centre-right CDU/CSU is in coalition talks with the centre-left Social Democrats (SPD) after February's election.
US President Donald Trump's overtures to Moscow over the Ukraine war have convinced many German politicians of the urgent need to invest in Germany's defence to become more independent from Washington.
The Bundesrat upper house of parliament is made up of representatives of Germany's 16 federal states, and several state leaders spoke in favour of the package before the vote.
Bavaria's state premier Markus Söder, who heads the CSU, told the chamber that "we must do everything we can to ensure that Germany once again becomes one of the strongest armies in Europe and can protect itself".
Söder said the armed forces need new weapons systems, including drones and air defences.
READ ALSO: What's in Germany's giant spending package?
He labelled the massive infrastructure spending a new "German Marshall Plan", in reference to the American post-World War effort to rebuild western Europe.
The plan exempts defence spending above one percent of GDP from strict debt rules and sets up a 500-billion-euro fund for infrastructure over 12 years.
All in all, it paves the way for over one trillion euros worth of outlays in Europe's top economy, which has shrunk for the past two years.
READ ALSO: Germany has ditched the debt brake, but what will the consequences be?
Comments