WASHINGTON — In a wide-ranging speech before the United Nations, President Donald Trump attacked Iranian leaders as “murderous,” taunted the North Korean leader as “rocket man” and promised to drive out Islamic terrorist groups in the Middle East.

He also criticized UN countries for making the United States shoulder a “disproportionate share” of military responsibilities throughout the world, adding that America cannot ensure global peace on its own.

The appearance this week before the international coalition was Trump’s first as commander in chief, and security issues dominated his remarks. They echoed his campaign trail promises of making foreign governments shoulder more security responsibilities, remarks which have raised concerns among American allies.

“The United States will forever be a great friend to the world, and especially to its allies,” Trump said. “But we can no longer be taken advantage of or enter into a one-sided deal where the United States gets nothing in return.

“As long as I hold this office, I will defend America’s interest above all else. But in fulfilling our obligations to our own nations, we also realize that it’s in everyone’s interest to seek a future where all nations can be sovereign, prosperous and secure.”

At the same time, Trump promised to use U.S. military force against rogue nations and other security threats, including North Korea. Officials there have held a number of missile and nuclear tests in recent months, actions which Trump’s administration have labeled a provocation

“The United States has great strength and patience, but if it is forced to defend itself or its allies, we will have no choice but to totally destroy North Korea,” he said.

Trump called North Korean leader Kim Jong Un “rocket man” for those recent tests and warned he is “on a suicide mission for himself and for his regime.”

“The United States is ready, willing and able. But hopefully, this will not be necessary,” Trump said.

The American president also reiterated his promise to stop radical Islamic terrorism, to “crush the loser terrorists,” and to “expose and hold responsible those countries who support and finance terror groups like al Qaida, Hezbollah, the Taliban and others that slaughter innocent people.”

Trump said that list includes Iran, a “reckless regime that speaks openly of mass murder, vowing death to America, destruction to Israel and ruin for many leaders and nations in this room.”

Solving those problems will require international cooperation, Trump acknowledged.

“Major portions of the world are in conflict, and some are going to hell,” he said. “But the powerful people in this room, under the guidance and auspices of the United Nations, can solve many of these vicious and complex problems.

“The American people hope that one day soon the United Nations can be a much more accountable and effective advocate for human dignity and freedom around the world.”

A day earlier, Senate leaders approved a $700 billion military budget outline for fiscal 2018. The legislation still must survive a conference committee before becoming law, but Trump praised the move as ensuring that “our military will soon be the strongest it has ever been.”