Donald J. Trump, exuding confidence after his resounding primary victories in the East, promised a foreign policy on Wednesday that he said would put “America first.” He castigated President Obama and Hillary Clinton, a former secretary of state and a possible opponent in the general election, for what he described as a string of missteps that have disillusioned the nation’s allies and emboldened its rivals.

Mr. Trump, the front-runner for the Republican presidential nomination, pledged a major buildup of the military, the swift destruction of the Islamic State and the rejection of trade deals that he said tied the nation’s hands. But he also pointedly rejected the nation-building of the George W. Bush administration, reminding his audience that he had opposed the Iraq war.

America is going to be strong again; America is going to be great again; it’s going to be a friend again,” Mr. Trump said. “We’re going to finally have a coherent foreign policy, based on American interests and the shared interests of our allies.”

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.

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.

Even Mr. Trump’s embrace of the slogan “America first” raised eyebrows, with critics noting that it was popularized in the 1930s by the aviator Charles A. Lindbergh and other isolationists who opposed the United States’ entering World War II. “To fly the banner of America First shows that he has historical amnesia or just doesn’t understand history,” Mr. Burns said.

On pressing issues like counterterrorism, Mr. Trump broke little new ground. He declined, for example, to give any details on how he planned to destroy the Islamic State to avoid tipping the military’s hand, beyond vowing that “they will be gone quickly.”

Mr. Trump promised to make the United States more dependable in the eye of its friends and allies, and more respected by its enemies. Yet just moments earlier, he also advocated increased unpredictability. “We have to be unpredictable,” he said. “And we have to be unpredictable starting now.”

The speech is his words and his thoughts,” said Paul Manafort, Mr. Trump’s newly installed campaign chief.Mr. Trump was introduced by Zalmay Khalilzad, an Afghan-born diplomat who was Mr. Bush’s ambassador to Afghanistan and Iraq, and is closely identified with the American wars in those countries. Mr. Khalilzad said afterward that he was not advising Mr. Trump formally or informally, and that the two men met for the first time in a holding room adjacent to where he delivered his speech.