France plunged into an unprecedented diplomatic crisis with the United States and Australia on Friday after it recalled its ambassadors from both countries over a trilateral security deal which sank a $40 billion French-designed submarine contract.

The rare decision taken by French President Emmanuel Macron was made due to the seriousness of the matter, Foreign Minister Jean-Yves Le Drian said in a statement.

On Thursday, Australia said it would scrap the $40 billion deal with France's Naval Group to build a fleet of conventional submarines and would instead build at least eight nuclear-powered submarines with U.S. and British technology after striking a trilateral security partnership. France called it a stab in the back.