NATO’s top military officer, Petr Pavel, denounced U.S. presidential candidate Donald Trump on Friday for criticizing the alliance as “obsolete”, saying such comments “played to the cards of our opponents”.

In unusual criticism of a presidential candidate, Pavel, chairman of the NATO Military Committee, said in an interview that Russian “President (Vladimir) Putin and some others may be pleased by this approach” and “to take such an approach would be a great mistake.”

Trump, the presumptive Republican nominee in the Nov. 8 U.S. presidential election, has criticized the decades-old NATO alliance with mainly European nations – a cornerstone of U.S. foreign policy – as obsolete and too costly for the United States.

The North Atlantic Treaty Organization was set up in a different era, Trump has said, when the main threat to the West was the Soviet Union. It was ill-suited to fighting terrorism.

Pavel, a former Czech Republic army chief, said the NATO alliance formed in 1949 was not perfect, but it had great potential as well as the chance to be improved.

“Statements like these are not necessarily damaging, but they are not useful,” Pavel said in Singapore on the sidelines of the Shangri-La Dialogue, Asia’s biggest security summit.

Trump’s emergence as a strong presidential candidate has been a talking point at the Shangri-La Dialogue. Carl Thayer, an Australian security expert, said the prospect of Trump in office would have to be dealt with realistically.

Australia’s experience had shown that “you damn well have to work with the U.S. president”, he said at a news conference.

FREEDOM OF NAVIGATION

At the meeting, Pavel was to discuss regional issues, including rival claims in the South China Sea and rising tension in Northeast Asia where North Korea has been stepping up its testing of nuclear capabilities.

China and the United States have traded accusations of militarizing the South China Sea, which is claimed almost entirely by Beijing. Brunei, Malaysia, the Philippines, Taiwan and Vietnam have claims to parts of the waters, through which trade worth trillions of dollars is shipped every year.

“Freedom of navigation in this region, through the South China Sea, is crucial for any further development in the region and it’s difficult to imagine that without this freedom, there will be stability and peace in this region,” Pavel said, adding NATO could not act on the issue using military means, but mainly political means.

North Korea, which conducted its fourth nuclear test in January and followed that with a satellite launch and tests of various missiles, was a “great concern” for NATO, Pavel said.

Western sanctions have not been successful in deterring Pyongyang from developing its nuclear capabilities.

“The only country which may change the equation is China,” Pavel said, pointing to the fact that 90 percent of North Korea’s trade is with its big neighbor.

Pavel also said he hoped an upcoming NATO summit in Warsaw would agree cyber as an operational domain of war, along with air, sea, land and space.

One of the other goals of the summit, Pavel said, was to recommit nations to increase their military spending, which has dropped since the 2008-09 global financial crisis.