Hundreds of immigrants showed up at border crossings Tuesday in hopes of getting into the United States but faced the likelihood of being turned away under a new Trump administration asylum rule that upends long-standing protections for people fleeing violence and oppression in their homelands.

The policy went into effect Tuesday but drew two swift lawsuits from immigrant advocacy groups in federal courts, one in San Francisco and one in Washington, D.C.

"This is the Trump administration's most extreme run at an asylum ban yet," said Lee Gelernt of the American Civil Liberties Union, an attorney on the San Francisco lawsuit. "It clearly violates domestic and international law and cannot stand."

The policy represents the most forceful attempt to date by President Donald Trump to slash the number of people seeking asylum in America. It comes at a time when Mr. Trump's recent tweets telling four members of Congress to "go back" to other countries have set off an uproar.

Mr. Trump did not mention the new practices Tuesday during a White House meeting.

Under the rules, migrants who pass through another country on their way to the U.S. will be ineligible for asylum. Most of the immigrants arriving at the border this year pass through Mexico – including Central Americans, Africans, Cubans, and Haitians. That makes it all but impossible for them to get asylum. The rule also applies to children who have crossed the border alone.

At the crossing in Tijuana, 12 people whose numbers were first on a waiting list to enter through a San Diego border crossing were escorted behind a metal gate to a white van that left minutes later to turn them over to U.S. authorities.

Ndifor Gedeon arrived in Tijuana nearly three months ago with the hope of seeking asylum in the U.S. after being jailed in Cameroon by a government that has been going after the African nation's English-speaking minority.

He was rethinking those plans after hearing that he may not have a chance at getting asylum because of the new policy and if his case is denied he will be deported straight back to Cameroon.

"I feel sick," he said of the anxiety consuming him. "If I am sent back to Cameroon, I'd lose my life. The situation is very horrible."

He speaks no Spanish and does not feel safe in Tijuana, which has one of the highest homicide rates in Mexico. Even so, he prefers Tijuana to returning to Cameroon.

Mr. Trump has long complained that immigrants are taking advantage of the nation's asylum system to get into the country, and his administration has taken several steps to limit their options.

Many of the measures have been rejected by the courts, but one notable exception is a policy that requires certain asylum seekers to wait in Mexico while their immigration court cases get resolved. About 20,000 have been sent back to Mexico, and thousands more are on wait lists just to get to the front of the line to get an asylum interview.

Asylum seekers must also pass an initial screening called a "credible fear" interview, a hurdle that a vast majority clear. Under the new policy, they would fail the test unless they sought asylum in at least one country they traveled through and were denied. They would be placed in fast-track deportation proceedings and flown to their home countries at U.S. expense.

Despite the policies, record numbers of immigrant families have been crossing the border this year, overwhelming border facilities and authorities. Five immigrant children have died since late last year after being detained by the government, and children have been found in squalid and overcrowded border facilities.

The crisis has only served to intensify immigration as a campaign issue as Mr. Trump looks to rally his base like he did in 2016 with his vow to build a wall on the border.

At a crossing in Ciudad Juarez, Mexico, 10 Cuban asylum seekers were called by Mexican officials and led across the Paso Del Norte Bridge to El Paso, where they were handed over to Customs and Border Protection officers. They were taken to a room where their possessions were searched, laid out on a table and bagged.

The immigrants will still go through the normal first steps of requesting asylum, but will face a dramatically higher bar to be allowed in the country.

Lawyers who represent Cuban migrants say that they are not deportable because Cuba will not accept them.

"I'd rather be in prison the rest of my life than go back to Cuba," said Dileber Urrista Sanchez, who had hoped his number would be called Tuesday, but he was further down the list.

Mr. Sanchez, has waited with his wife in Juarez for the past two months, renting a room with money his mother sends him from Las Vegas.

He said his mother left Cuba years ago because she was part of an opposition party. In retaliation, he said, the government took away his job as a chauffeur, and he and his wife had been imprisoned for days at a time for being "untrustworthy."

He criticized the Trump administration's new policy, pointing out that the first country he was able to reach after leaving Cuba was Nicaragua.

"How are we going to apply for asylum in Nicaragua when it's just as communist?" he said.

Derek Mbi of Cameroon was among nearly 50 migrants who gathered in Tijuana. He arrived there about a month ago, and more than 8,100 people were ahead of him on the waiting list.

Processing new arrivals has ground to a virtual halt in recent days, down from an average of about 40 names a day.

Mr. Mbi, joined a wave of Cameroonians who fled fierce government oppression against their country's English-speaking minority by flying to Ecuador, which does not require a visa. From there, he traveled for months by bus and on foot through seven other countries to reach Tijuana.

Mr. Mbi learned about the new policy but mistakenly believed that it applied only to Central and South Americans. He hopes to settle with a friend in Texas.

For now, he is sharing a one-bedroom apartment with 13 Cameroonians in Tijuana and scraping by with odd jobs, like peeling tomatoes at open-air markets. He said many companies refused to hire him because his short-term transit permit in Mexico does not allow him to work.

This story was reported by The Associated Press. Cedar Attanasio reported from Ciudad Juarez, Mexico. Associated Press writers Colleen Long and Michael Balsamo in Washington and Julie Watson in Tijuana contributed to this report.