For Mr. Trump, whose campaign appearances are often a gleeful exercise in showmanship and off-the-cuff wisecracks, the speech had all the trappings of a serious address. Standing beneath a twinkling chandelier in a Washington hotel ballroom, backed by American flags and facing a sedate, largely gray-haired audience, a measured Mr. Trump read his remarks from a teleprompter, staying almost completely on script.

But if Mr. Trump adopted establishment trappings, his speech still had an insurgent tone. He criticized allies in Europe and Asia for not bearing the burden of their own defense, he said he would try to mend fences with Russia, and he assailed his opponents for being overly aggressive in foreign affairs. Mr. Trump said he had no plans to take advice from the foreign policy elite, and his agenda reflected that — a mélange of ideas that defied Republican and Democratic orthodoxy.

There were paradoxes throughout Mr. Trump’s speech. He called for a return to the coherence of America’s foreign policy during the Cold War. Yet he was openly suspicious of the institutions that undergirded that era. He promised to eradicate the Islamic State, but said the campaign against extremism — or as he called it, “radical Islam” — was as much a philosophical struggle as a military one.

“Our friends and enemies must know that if I draw a line in the sand, I will enforce that line in the sand — believe me,” Mr. Trump said. “However, unlike other candidates for the presidency, foreign aggression will not be my first instinct.” He did not mention anyone by name, though his strongest Republican opponent, Senator Ted Cruz of Texas, has threatened to carpet-bomb the Islamic State until the desert sand glows.