The German gaffer will be in charge of the Mannschaft for Euro 2012...
Loew took over from Juergen Klinsmann after the 2006 World Cup in Germany and steered his team to the Euro 2008 final where they lost to Spain.
Die Mannschaft then qualified top of their group for next year's World Cup in South Africa. Germany have been drawn in a group with Serbia, Ghana and Australia at the 2010 World Cup finals.
"We are in agreement that we want to continue together with the national team," said DFB President Theo Zwanziger.
Zwanziger said the deal was sealed with a handshake on Tuesday evening and the new contract will be signed in January.
Team manager Oliver Bierhoff, assistant Hans-Dieter Elick, goalkeeping coach Andreas Koepke and chief scout Urs Siegenthaler will also stay on as part of the deal.
Stefan Coerts, Goal.com