David Jackson

USA TODAY

President Obama said Friday that Donald Trump doesn't understand foreign policy or the world in general, and U.S. allies are increasingly concerned about the Republican front-runner's loose rhetoric about nuclear weapons.

"People pay attention to American elections," Obama said at a news conference following the bi-annual Nuclear Security Summit in Washington, adding that the topic of Trump surfaced on the sidelines of those meetings. "What we do is really important to the rest of the world."

Trump has said the United States is spending too much on defense assistance to a host of nations, from NATO allies in Europe to Japan and South Korea in Asia. The New York billionaire said these nations should spend more on their own defense, including the development of nuclear weapons if necessary.

The candidate making these kinds of statements "doesn’t know much about foreign policy or nuclear policy or the Korean peninsula, or the world generally," Obama said.

U.S. releases inventory of A-bomb materials

Obama said U.S. alliances — many dating from World War II — have promoted peace and prosperity for decades. Those alliances, he said, involve extensive national interests, such as the cooperation with Japan and South Korea in confronting the threats of nuclear-armed North Korea, one of the subjects of the Nuclear Security Summit.

Trump has said that Japan and South Korea might want to develop their own nuclear weapons to counter North Korea, an idea that Obama administration officials said would promote dangerous nuclear proliferation.

While not specifying which countries at the summit expressed concerns about Trump, Obama said that even nations who are used to "a carnival atmosphere" in their own politics "want sobriety and clarity when it comes to U.S. elections."

He added: "They understand the president of the United States needs to know what's going on around the world."

On a related election issue, Obama declined to say whether he voted for Hillary Clinton or Bernie Sanders in the recent Illinois Democratic primary.

"It's a secret ballot, isn't it?" Obama said.