“I’m committing the United States to Article 5,” Mr. Trump told reporters at a news conference on Friday with visiting Romanian President.

President Donald Trump says the United States is committed to the mutual defense of NATO members, casting aside concerns that his failure to mention the commitment last month weakened the alliance.

Mr. Trump said on Friday that he was “committing the United States to Article 5.” That article in the NATO treaty says an attack on one member is an attack on all members and binds the allies to come to that country’s defense.

European countries and others expressed concern last month when Mr. Trump did not mention the clause in a speech at NATO headquarters in Brussels. In that speech, Mr. Trump demanded that allies live up to a pledge to spend 2 percent of their gross domestic product on defense by 2024. He did not specifically mention Article 5, which has only been invoked once, after the Sept. 11, 2001, terrorist attacks.

“I’m committing the United States to Article 5,” Mr. Trump told reporters at a news conference on Friday with visiting Romanian President Klaus Iohannis. “Certainly we are there to protect, and that’s one of the reasons that I want people to make sure we have a very, very strong force by paying the kind of money necessary to have that force. But yes, absolutely, I’d be committed to Article 5.”

The White House later reaffirmed the commitment in a statement announcing that Mr. Trump will visit Poland next month as part of his second foreign trip. It said that in addition to showing America’s support of Poland, the trip will also emphasize the president’s commitment to strengthening NATO’s “collective defense.”

Mr. Trump’s omission in Brussels raised concerns on both sides of the Atlantic Ocean. White House aides said the President’s support was implied even though he deliberately did not utter the words.

Still, allies had questions about Mr. Trump’s belief in the value of NATO, which he had termed “obsolete” during the presidential campaign.

On Friday, Mr. Trump noted that only a handful of NATO’s 29 members Montenegro joined just this week were meeting the 2 percent pledge. But he said the U.S. would abide by its treaty obligations.

“We’re going to make NATO very strong,” he said. “You need the money to make it strong. You can’t just do what we’ve been doing in the past.”