The Biden administration’s surprise decision to share sensitive nuclear submarine technology with Australia brought a swift backlash from China on Thursday, and an angry charge of betrayal from France, which said the secretly negotiated deal reminded it of something President Donald Trump would have done.

French Foreign Minister Jean-Yves Le Drian called the Australian decision, which effectively canceled a $66 billion agreement to buy 12 French diesel-powered submarines, “unacceptable” and “incomprehensible.”

As for the United States, "this unilateral, sudden and unforeseeable decision very much recalls what Mr. Trump would do," he said in an interview with France Info radio.

The French Embassy in Washington promptly canceled a Friday night gala commemorating the country's naval assistance to American forces during the Revolutionary War. In what Paris clearly saw as an added insult, Britain is also part of the U.S.-Australian deal.

White House press secretary Jen Psaki said that France was "aware in advance" of the new agreement, although Secretary of State Antony Blinken indicated that awareness came only in the past day or two.

A French official said Paris learned of the decision, which was negotiated for months among the three participants, through media reports. "We were not informed of this project until the information was published in the American and Australian press, which preceded Joe Biden's official announcement by a few hours," said the official, speaking on the condition of anonymity because of the diplomatic sensitivity of the subject.

Asked what President Biden thought of Le Drian's Trump comparison, Psaki said that "the president doesn't think about it much" and that he was focused on "security in the Indo-Pacific."

The three-nation pact announced Wednesday by Biden, Australian Prime Minister Scott Morrison and British Prime Minister Boris Johnson, called AUKUS, is clearly aimed at China, although the three leaders did not mention Beijing. China is thought to have six nuclear-powered attack submarines, with plans to increase the fleet in the next decade.

The AUKUS countries will work over the next 18 months to hash out the details of the deal, including the type — either U.S. Virginia class or British Astute class — and price of the submarines, Morrison said. It will be years before the first Australian nuclear-powered submarine is deployed, he said.

The nuclear-powered subs will be faster, more capable, harder to detect and potentially much more lethal than conventional submarines. They will carry conventional — not nuclear — weapons, the three leaders emphasized.

China and France denounced a new Indo-Pacific security alliance between the United States, Britain and Australia on Sept. 16. (Reuters)

Only six nations, including France, have nuclear-powered submarines, and the United States had previously shared its technology only with Britain.

In Beijing, Foreign Ministry spokesman Zhao Lijian described the agreement as "an outdated Cold War mentality" and told Australia — which has been locked in a trade war with China for years — that it should "prepare for the worst," without giving details.

Speaking at a regular news briefing in Beijing, Zhao said the AUKUS alliance “undermined regional peace and stability, aggravated the arms race and hurt international nonproliferation efforts.”

China’s state-run Global Times described the United States as “losing its mind trying to rally its allies against China” and accused Australia of becoming a “running dog” of Washington.

In Australia, however, the pact was widely viewed as a new chapter in bonds with the United States after questions about whether the relationship was wobbling. Biden’s decision not to call Morrison, a partner in Afghanistan, until two days after U.S. troops left Kabul, stung in Australia.

After years of promising to pivot to Asia, first under President Barack Obama and now Biden, the United States is finally taking a major step in that direction, said Ashley Townshend, a defense expert at the U.S. Studies Center in Sydney.

“This is a tectonic development,” he said of the submarine deal. “It is exceedingly significant for Australian security.”

Not everyone in Australia was pleased about the deal. Australian Sen. Rex Patrick, an independent who is also a former naval submariner, called for an inquiry into the agreement, saying it raised questions around the country’s commitment to nuclear nonproliferation. Adam Bandt, leader of the Greens, called the submarines “floating Chernobyls.”

The leader of the opposition Labor Party, Anthony Albanese, expressed support for AUKUS but criticized the prime minister for the “failure” of the French submarine deal, which already cost billions.

French officials insisted that the significant economic loss paled beside what was a diplomatic affront. “It’s really a stab in the back” from Australia and a betrayal of trust, Le Drian said.

“I’m very angry today, and bitter. . . . This is not something allies do to each other,” he said of the Australians.

But Le Drian saved his most severe scorn for the United States and for Biden, including the comparison to Trump.

Trump and the government of French President Emmanuel Macron battled over multiple issues, including trade and tariffs, and what the French considered Trump’s basic rudeness. In late 2018, after Trump linked domestic economic protests in France to Macron’s support for the Paris climate accord, Le Drian angrily responded, “I say this to Donald Trump and the French president says it, too: Leave our nation be.”

The deepest modern rift between the two countries, however, came in early 2003, when France loudly refused to support the U.S. invasion of Iraq, saying that “nothing” would justify the war.

Biden’s pledge to restore a close relationship with Europe, and his praise of France as the closest of allies, was supposed to relegate those conflicts to the past. Blinken, at a Thursday news conference with Defense Secretary Lloyd Austin and their Australian counterparts, said that “we cooperate incredibly closely with France on many shared priorities in the Indo-Pacific, but also beyond, around the world.”

“We’re going to continue to do so,” he said. “We place fundamental value on that relationship, on that partnership, and we will carry it forward in the days ahead.”

After the announcement, two senior French officials complained to White House national security adviser Jake Sullivan, one on the telephone and one in person, according to officials from both countries.

Both Blinken and Psaki emphasized that the decision to drop the French submarine contract and make a deal with the United States and Britain was an Australian one, and that it had nothing to do with U.S. relations with France.

“There are a range of partnerships that include the French, and some partnerships that don’t,” Psaki said. “The French have partnerships with other countries that don’t include us. That is how global diplomacy works.” While France and the United States are both members of NATO, the United States also maintains defense, economic and intelligence pacts in the Indo-Pacific.

In expressing their outrage, French officials noted that, unlike Britain, France is an Indo-Pacific nation, with more than 2 million citizens in island territories across the two oceans and a robust military presence. France released a strategy for the region in 2018; the European Union released its Indo-Pacific strategy this week.

Australia commissioned its new submarine fleet in 2016, as tensions with China were beginning to rise. But the French deal had been troubled almost from the start. In June, after Australian complaints about production delays, cost overruns and disagreements over the use of local contractors, Morrison met with Macron in Paris.

Morrison, the Sydney Morning Herald reported at the time, gave the French a September deadline to convince his government that the project could continue.

At a dinner for the Australian leader, Macron called the agreement a “pillar of our partnership and the relationship of confidence between our countries,” and said, “I want to assure you of our full and complete commitment.”

Miller reported from Sydney and Kuo reported from Taipei, Taiwan. John Hudson, Anne Gearan and Felicia Sonmez in Washington contributed to this report.