Updated

President Trump on Friday gave a triumphant, patriotic speech to 2018 graduates of the U.S. Naval Academy, promising to stand up for the U.S. without apology and hailing what he said was the re-emergence of American confidence since he took office.

“Our economy is the strongest it’s ever been and our country has regained the respect that we used to have long ago abroad,” he said in the commencement speech in Annapolis, Maryland. “Yes they're respecting us again, yes America is back.”

Trump spoke to 1,042 newly commissioned ensigns and second lieutenants. In his remarks, he highlighted his efforts to increase federal spending and took credit for securing pay increases for the military and more ships.

He told the graduates that a robust military made America safer as “you’re less likely to have to use it if you have it,” but said that if the U.S. must fight, then it should fight to win.

“If a fight must come, there is no other alternative,” he said. Victory, winning, beautiful words but that's what it's all about.”

His remarks come a day after he cancelled a planned summit with North Korean dictator Kim Jong Un amid aggressive language from that country. Defense Secretary Jim Mattis on Friday, however, hinted that the summit may be back on “if our diplomats can pull it off.”

TRUMP WELCOMES 'PRODUCTIVE' STATEMENT FROM NORTH KOREA, SAYS DEMS 'ROOTING AGAINST' TALKS 

Trump has heightened tensions with Iran after he pulled the U.S. out of the 2015 Iran nuclear deal -- a deal he had repeatedly blasted as a bad deal put together in part by the Obama administration

In his speech Friday, Trump also targeted “critics and cynics” within America who he said have sought to downplay the U.S.

“A growing number use their platform to denigrate America's incredible heritage, challenge America’s sovereignty and weaken America’s pride,” he said.

That appeared to be a reference to some Democrats, who in a tweet earlier Friday Trump accused of “rooting against” the U.S. in its negotiations with North Korea, and siding with MS-13 gang members.

“We are not going to apologize for America, we are going to stand up for America -- no more apologies,” he said in his address to graduates. “We are going to stand up for our citizens, stand up for our values and stand up for our men and women in uniform.”

Trump ran his 2016 presidential campaign on the slogan “Make America Great Again” and in his remarks, suggested that he believed that his campaign slogan was being achieved, citing a “great reawakening of American spirit and American might.”

“We have rediscovered our dignity, regained our stride and we are proud again,” he said.

Fox News’ Lucas Tomlinson and The Associated Press contributed to this report.