President Trump reiterated a threat to close the U.S.-Mexico border after a meeting at the White House on Tuesday, saying he stands ready to take drastic action if the country doesn't do more to curb illegal immigration. He also railed against the U.S. immigration system and said he wants to "get rid" of immigration judges who hear migrants' cases.

"Security is more important to me than trade," Mr. Trump said when asked about the severe economic impact of closing the border. "We'll have a strong border or we'll have a closed border."

The president spoke after meeting in the Oval Office with Jens Stoltenberg, the secretary general of the North Atlantic Treaty Organization (NATO).

Get Breaking News Delivered to Your Inbox

Last week, Mr. Trump tweeted threats to close the border if Mexico doesn't do more to cooperate with the U.S. and slow the flow of migrants. But the commander-in-chief appeared to shift that timeline Tuesday, saying Mexico is assisting the U.S. more than it was even a few days ago. The president said he's still "totally prepared" to close the border if necessary.

Along with a list of frustrations over immigration, however, Mr. Trump included immigration judges. U.S. immigration court backlogs are at all-time highs, with not enough judges to adjudicate the cases. That problem was exacerbated by the government shutdown earlier this year.

"We need to get rid of chain migration, we need to get rid of catch and release and visa lottery, and we have to do something about asylum. And to be honest with you, have to get rid of judges," Mr. Trump said in his laundry list of frustrations with the U.S. immigration system.

Mr. Trump also walked back his insistence that the Republican Party will imminently introduce a new health care plan. Overnight, the president tweeted he would wait to hold a vote on his yet-to-be-envisioned health care plan until after the 2020 election. On Tuesday, the president said he will bring forth a plan "at the appropriate time."

"We don't have the House," Mr. Trump said about the delay, which came after he said the Republican Party will become the "party of health care."

Republicans failed to repeal and replace Obamacare in the two years they held the House and Senate.

Stoltenberg's visit came as Mr. Trump tries to decrease the U.S. footprint abroad with his "America First" foreign policy. Mr. Trump has urged other NATO nations to increase their defense spending to agreed-upon levels, a stance many see as positive, but on Tuesday the president said defense spending will need to go higher than 2 percent. Currently NATO members agree to spend at least 2 percent of GDP on defense, but Mr. Trump, in a meeting alongside the secretary general, said that figure "may have to go up."

Meanwhile, Mr. Trump's close relationships with North Korean leader Kim Jong Un and Russian President Vladimir Putin while criticizing U.S. allies has made some ally NATO nations distance themselves from the U.S. Last year, for instance, German Chancellor Angela Merkel said Germany can't rely "on the superpower of the U.S." any longer to bring order to the world.

Before he became president, Mr. Trump declared NATO "obsolete." He later revised that statement, saying he no longer believes that to be the case.

"I said it was obsolete. It's no longer obsolete," Mr. Trump declared during Stoltenberg's visit in 2017.

When NATO was founded in 1949, there were 12 ally nations. Now there are 29. Last month, Mr. Trump suggested perhaps Brazil could be a part of NATO, though Brazil is largely in the southern hemisphere.

More on Trump and NATO: