The deal clears the way for the largest ever road and railway construction project in northern Europe and one of the biggest infrastructure projects on the European continent.
"I am proud that Denmark and Germany today have signed a treaty on a stable connection via the Fehmarn Strait (bridge)," Danish Transport Minister Carina Christensen said in a statement, describing the project as "large and important for the Danish government."
Christensen and her German counterpart, Wolfgang Tiefensee, signed the treaty, agreeing to build a 19-kilometre (12-mile) road and rail link stretching from Roedbyhavn (150 kilometres south of Copenhagen) and Puttgarden in northern Germany.
"This is a good day for the strengthening of communication routes across Europe!" Tiefensee said in a separate statement, adding that the bridge would be an "important element in the completion of a North-South axe between Scandinavia and Central Europe."
The bridge, which is scheduled to open in 2018, is expected to cost €5.6 billion ($8.1 billion). Denmark is footing €4.8 billion of the bill while Germany will only pay for linking the bridge to its existing transport and infrastructure.
Once the project is completed, Copenhagen expects to be reimbursed for its expenses through user tolls, Christensen told Danish TV2.
A large majority of the Danish parliament gave the green light for the project on Tuesday. The far-right Danish People's Party, which is the centre-right coalition government's main ally, however voted against building the bridge, insisting it was "too expensive with questionable profitability."
The small far-left Unity List also opposed "spending billions to transform Denmark into a transit country for (neighbouring) Sweden's exports to Germany," party spokesman Per Clausen said.
There is also resistance in Germany to the project. "This insane project, which will cost billions, is risky from a global warming perspective and when it comes to protecting the environment and different species," Leif Miller, the head of environmentalist group Nabu, told Berlin daily Der Tagesspiegel. "We will stop the construction with all legal means available," he added.
Denmark's Christensen however insisted Wednesday that the new bridge "means a reduction in emissions of among other things CO2 (carbon dioxide) compared to if ferry traffic between Roedby and Puttgarden continued.” She also pointed out that the Fehmarn bridge, a project that has been discussed in Denmark for more than 20 years, would cut travel time by an hour between Copenhagen and Hamburg, to just three hours.