German Defense Minister Ursula von der Leyen delivers an opening statement on the first day of the 53rd Munich Security Conference on Feb. 17. (Christof Stache/Agence France-Presse via Getty Images)

Germany’s defense chief on Friday hit President Trump’s dismissive attitude toward Washington’s European allies, giving a frosty reception to U.S. envoys at the largest ­conclave of U.S. and European officials since the inauguration.

Speaking to a packed hall that included Defense Secretary Jim Mattis and Homeland Security Secretary John F. Kelly, German Defense Minister Ursula von der Leyen hammered Trump’s ­attitudes toward Russia without ever mentioning the U.S. leader by name.

“There can be no policy of equidistance between allies on one side and those who on the other question our borders, our values and the principles of ­international law,” von der Leyen said to applause at the Munich Security Conference, where ­Europe’s senior security leaders were gathering to figure out how to respond to Trump.

“We must pursue finding a reliable coexistence with Russia together instead of going over our partners’ heads in a bilateral relationship,” she said.

Trump has offered the most direct challenge to the ­transatlantic security alliance in its post-World War II history, calling NATO “obsolete,” ­welcoming Britain’s decision to split from the European Union and holding back from criticism of Russian President Vladimir Putin, who in 2014 redrew ­European borders by annexing Ukraine’s Crimean Peninsula.

In comments shortly before his inauguration, Trump equated his relationships with German Chancellor Angela Merkel and Putin, saying he would start off with open minds on both of them and then reevaluate based on how they treat him.

Mattis and Kelly were ­dispatched to Europe this week to reassure nervous allies about Trump’s policies, even as they reaffirmed some of his toughest messages on the need for greater European defense spending.

Vice President Pence arrived Friday ­evening in Munich as he kicks off a ­miniature tour of European ­capitals.

The visits come amid ­controversy on Trump’s team’s ties to Russia. Michael Flynn was forced to resign as national security adviser Monday after The Washington Post reported that he may have had improper conversations with Russia’s ­ambassador to the United States, Sergey Kislyak.

But many European leaders are responding to Trump’s push by agreeing to spend more while also saying that all Western allies — including the United States — must not abandon the basic values that helped create a ­Western security backbone in the years since 1945.

Only four nations apart from the United States meet NATO commitments for defense ­spending. Germany, Europe’s largest economy, is among the laggards, and it would need to nearly double its budgetary ­commitments to get there, ­ballooning its military into ­Europe’s most powerful.

Without dismissing the ­spending guidelines, von der Leyen said that NATO’s strength was far more than an economic balance sheet.

“Burden sharing is a matter of funding, of money, but sharing the burden is also much more than what can be expressed in euros and in dollars,” von der Leyen said. “To share a burden is to first of all share the principle to stand up for one another. Without exception.”

She also hit against Trump’s stated affinity for torture and campaign-trail rhetoric that ­appeared to dispense with the need to avoid civilian deaths in prosecuting wars in the Middle East.

The alliance must be “bound by human dignity in all it does,” von der Leyen said. “This leaves no room for torture. It means avoiding civilian casualties at all cost.”

“We must beware of turning this fight into one against Islam and Muslims per se. Otherwise we run the risk of deepening the trenches from which terrorism grows,” she added.

Von der Leyen met Mattis in Washington last week before he traveled to Brussels and Munich this week. She has pushed for greater European defense ­spending — an unpopular stance domestically — even as she has echoed Merkel’s firm message about not abandoning ­fundamental values.

Von der Leyen’s comments largely fall in line with what Mattis has advocated over the past few months, at times putting him at odds with Trump’s views. In particular, Mattis said during his confirmation hearing that he views Russia as the top security threat to the United States and that Moscow wants to “break” the NATO military alliance.

Mattis also told Trump before he was nominated that he was against torture and that there are other more effective ways of getting information, surprising the president. Trump said last month that he still “absolutely” believes torture works but would defer to Mattis on the issue.

The defense secretary has dampened speculation about a U.S. rapprochement with Russia, saying Thursday that it was too early to discuss any military collaboration. But he also has delivered Trump’s tough message on defense spending to fellow defense chiefs in NATO, warning that the United States may “moderate its commitment” if allies do not start meeting their spending obligations.

On Friday, Mattis continued his warnings to European ­partners, even as he assured them that NATO’s mutual ­defense agreements are a ­“bedrock commitment.”

“To confront the threats facing our alliance, we must recognize not just strategic realities, but also political realities. President Trump came into office and has thrown now his full support to NATO,” Mattis told the hall in remarks immediately after von der Leyen spoke. “It is a fair demand that all who benefit from the best alliance in the world carry their proportionate share of the necessary costs to defend our freedoms.”

Mattis’s message on the need to devote more to defense ­spending has been welcomed by NATO Secretary General Jens Stoltenberg. But Stoltenberg said Friday after a meeting with ­Russian Foreign Minister Sergei Lavrov that there were few ­fundamental shifts in Russia’s position on NATO, Ukraine or Syria. He pointed to modest progress in avoiding inadvertent incidents between the militaries when they operate in proximity to each other.