WASHINGTON (AP) — President Donald Trump on Friday invoked extraordinary national security powers to deny asylum to migrants who enter the country illegally, tightening the border as caravans of Central Americans slowly approach the United States.

Trump is using the same powers he used to push through a version of the travel ban that was upheld by the Supreme Court. The proclamation puts into place regulations adopted Thursday that circumvent laws stating that anyone is eligible for asylum no matter how he or she enters the country.

"We need people in our country but they have to come in legally and they have to have merit," Trump said Friday as he prepared to depart for Paris.

The measures are meant to funnel asylum seekers through official border crossings for speedy rulings, officials said, instead of having them try to circumvent such crossings on the nearly 2,000-mile (3,200-kilometer) border. But the busy ports of entry already have long lines and waits, forcing immigration officials to tell some migrants to turn around and come back to make their claims.

The move was spurred in part by caravans of Central American migrants slowly moving north on foot but will apply to anyone caught crossing illegally, officials said Thursday. It's unknown whether those in the caravan, many fleeing violence in their homeland, plan to cross illegally.

Administration officials said those denied asylum under the proclamation may be eligible for similar forms of protection if they fear returning to their countries, though they would be subject to a tougher threshold. Those forms of protection include "withholding of removal" — which is similar to asylum, but doesn't allow for green cards or bringing families — or asylum under the United Nations Convention Against Torture.

The announcement was the latest push to enforce Trump's hardline stance on immigration through regulatory changes and presidential orders, bypassing Congress. But those efforts have been largely thwarted by legal challenges and, in the case of family separations this year, stymied by a global outcry that prompted Trump to scrap them.

The new changes were likely to be met with legal challenges, too. Omar Jadwat, director of the American Civil Liberties Union's Immigrants' Rights Project, said Thursday they were clearly illegal.

"U.S. law specifically allows individuals to apply for asylum whether or not they are at a port of entry. It is illegal to circumvent that by agency or presidential decree," he said.

Curbing immigration has been a signature issue for Trump, who pushed it hard in the days leading up to Tuesday's midterm elections, railing against the caravans that are still hundreds of miles from the border.

He has made little mention of the issue since the election but has sent troops to the border in response. As of Thursday, there are more than 5,600 U.S. troops deployed to the border mission, with about 550 actually working on the border in Texas. The military is expected to have the vast majority of the more than 7,000 troops planned for the mission deployed by Monday, and that number could grow.

Trump also suggested he'd revoke the right to citizenship for babies born to non-U.S. citizens on American soil and erect massive "tent cities" to detain migrants. Those issues were not addressed by the regulations Thursday.

The administration has long said immigration officials are drowning in asylum cases partly because people falsely claim asylum and then live in the U.S. with work permits.

The asylum section of the Immigration and Nationality Act says a migrant is allowed to make a claim up to a year after arriving in the U.S., and it doesn't matter how they arrive — illegally or through a border crossing.

Migrants who cross illegally are generally arrested and often seek asylum or some other form of protection. Claims have spiked in recent years, and there is a backlog of more than 800,000 cases pending in immigration court. Generally, only about 20 percent of applicants are approved.

Trump has long said those seeking asylum should come through legal ports of entry. But many migrants are unaware of that guidance, and official border crossings have grown clogged.

Officials have turned away asylum seekers at border crossings because of overcrowding, telling them to return later. Backlogs have become especially bad in recent months at crossings in California, Arizona and Texas, with some people waiting five weeks to try to claim asylum at San Diego's main crossing.

In 2017, the U.S. fielded more than 330,000 asylum claims, nearly double the number two years earlier and surpassing Germany as highest in the world.

It's unclear how many people en route to the U.S. will even make it to the border. About 4,800 migrants are sheltered in a sports complex in Mexico City, some 600 miles (965 kilometers) from the U.S. border. Several smaller groups were trailing hundreds of miles to the south; officials estimated about 7,000 in all were in the country in the caravans. The migrants are largely poor people and many say they're fleeing violence; more than 1,700 were children under 18, and more than 300 were children under age 5.

Similar caravans have gathered regularly over the years and have generally dwindled by the time they reach the southern border. Most have passed largely unnoticed.

___Associated Press writers Elliot Spagat in San Diego and Jill Colvin in Washington contributed to this report.