Chancellor Angela Merkel has said that a new Franco-German friendship treaty was a step toward the creation of a future joint European army.
Ms Merkel said the pact aims to build a Franco-German "common military culture" and "contributes to the creation of a European army".
President Emmanuel Macron and Chancellor Merkel signed the deal, which pledges deeper economic and defence ties as well as commitment to the EU, in the German city of Aachen.
The French presidency said it was an "important moment" for showing the relationship was "a bedrock which can relaunch itself ... in the service of reinforcing the European project".
Aachen, which sits on the Dutch and Belgian borders, is rich in European symbolism as the seat of power of Charlemagne, the 1st-century emperor who ruled over swathes of western Europe.
"We're seeing an existential crisis in terms of European integration, with Brexit and the expected strengthening of nationalists at the next European elections," said Claire Demesmay, a political scientist at German research institute DGAP.
"In this context, confirming this belief in Franco-German cooperation has symbolic value," she told German public radio.
Both leaders signed the deal on the anniversary of a similar Franco-German cooperation treaty in 1963 by France's Charles de Gaulle and the German chancellor of the time, Konrad Adenauer.
The new treaty aims to kick start the relationship known as the "Franco-German motor", traditionally seen as the key alliance in Europe between two economic and political heavyweights.
Mr Macron came into power in May 2017 seeking Mrs Merkel's backing for major reforms of the EU in a bid to restore faith in its institutions and quell rising populism.
But his ideas met with only lukewarm support from Mrs Merkel and other EU leaders, while Paris and Berlin have differed on other issues including how to tax internet giants.
In December, EU leaders signed off on a watered-down version of President Macron's proposals, including a highly tentative plan to explore a eurozone budget.
The treaty commits France and Germany to closer military ties, including possible joint deployments - in the event of a terror attack, for example.
The two countries could also cooperate more closely on procurement, such as the purchase or development of new tanks or fighter jets.
It also includes a "mutual defence clause" in the event of one of them being attacked, although they are already committed to this as members of NATO.
The closer military ties come after Mr Macron sparked a row with US President Donald Trump late last year by urging Europe to reduce its military dependence on the US, even calling for a "real European army".
The treaty also paves the way for a joint parliament made up of 50 members of the French national assembly and the same number from the Bundestag, and language-learning initiatives in both countries.
But at home, Mr Macron's critics on both the far-left and far-right have seized on the treaty as an erosion of French sovereignty.
A wave of false rumours have spread online that President Macron is going to Germany to sign away parts of French territory to Mrs Merkel.
Far-right leader Marine Le Pen accused Mr Macron of seeking to "dismantle the power of our country".
Both Mr Macron and Mrs Merkel have spoken movingly of the importance of close ties between two countries which share the brutal history of two world wars.
But some other European leaders have bristled at the idea of an all-dominating "Franco-German motor".
Italy's far-right Interior Minister Matteo Salvini has said ahead of European parliament elections in May that he wants to challenge Mrs Merkel and Mr Macron's staunchly pro-European message with a eurosceptic "Italian-Polish axis".
Both the French and German leaders have seen easier times, with Germany already looking to a post-Merkel future after she announced she would step down as chancellor in 2021.
President Macron's grand plans to save Europe have meanwhile had to go on the back burner as he grapples with a wave of anti-government "yellow vest" protests.
Both leaders will speak at the signing ceremony at Aachen's historic city hall before taking part in a "citizen debate" with French and German students.
We need your consent to load this rte-player contentWe use rte-player to manage extra content that can set cookies on your device and collect data about your activity. Please review their details and accept them to load the content.Manage Preferences