Shortly after Russia invaded Ukraine, refugees from the threatened nation started showing up at Mexico’s border with the United States. Roughly 1,000 Ukrainians a day flew to Tijuana on tourist visas, desperate to reach U.S. soil.

The volume was overwhelming the nation’s busiest border crossing in San Diego. In Tijuana, thousands of Ukrainians slept in a municipal gym hoping for a chance to cross into the U.S.

In response, the administration announced it would admit up to 100,000 Ukrainians for two years — if they applied online, had a financial backer and entered through an airport. At the same time, border officials turned back Ukrainians who arrived on foot at the U.S. border.

The Biden administration has considered those policies to be so effective that a similar model has become the centerpiece of a broader border policy rolling out in earnest, as pandemic-related restrictions end that had allowed U.S. officials to quickly turn away migrants crossing illegally.

The results are sure to be a test for President Joe Biden, who is seeking reelection as the border shifts back into the political spotlight and Republicans seek to portray him as soft on security.

“Our model is to build lawful pathways and then to impose consequences that the law provides on those that do not avail themselves of those lawful pathways,” Homeland Security Secretary Alejandro Mayorkas told reporters last month.

It’s a shift away from the more open immigration policies that characterized Biden’s first year as president in favor of an approach that pairs beefed-up enforcement with expanded legal pathways and diplomacy.

The policies have been criticized by the left as too much like former President Donald Trump’s. Others wonder whether anything Biden does will stop the flow of migrants along the southern border, and whether the new policies can survive expected legal challenges and a lack of resources.

But some immigration experts think it may be a balanced approach that results in fewer illegal crossings while still providing a haven for those fleeing persecution.

“I think they have a fighting chance, over time, to turn this into a real system that is both more fair and more controllable,” said Andrew Selee, president of the Migration Policy Institute, a non-partisan immigration think tank.

This account is based in part on interviews with more than a dozen current and former administration officials who spoke to The Associated Press on condition of anonymity to discuss internal deliberations.

Within his first month in office, Biden signed a slew of executive actions to undo Trump-era policies. He backed legislation to provide a path to citizenship for millions in the country illegally. He stacked his administration with immigrant advocates eager to push back against what they saw as anti-immigrant policies by Trump.

But alarms rang almost immediately when nearly 19,000 children traveling alone were stopped at the border in March 2021. Senior officials met twice weekly to strategize, moving children out of badly overcrowded Border Patrol facilities to emergency shelters, including convention centers in California and military bases in Texas.

While the number of unaccompanied children eased, a “daily dashboard” monitored by top officials showed overall arrivals continuing to rise, especially families.

Most of the people coming to the U.S. border illegally are fleeing persecution or poverty in their home countries. They ask for asylum and have generally been allowed into the U.S. to wait out their cases. That process can take years under a badly strained immigration court system, and it has prompted increasing numbers to come to the border hoping to get into the U.S.

Even though many ask for asylum, the legal pathway is narrow and most do not meet the standard.

By the time Russia invaded Ukraine on Feb. 24, 2022, many officials with close ties to immigration advocacy groups had left the administration, some exasperated that their views weren’t gaining more traction and feeling that Biden was not as focused on the U.S.-Mexico border as he was on other issues. That left officials with more centrist views in charge.

Mayorkas and others were worried that Ukrainians could be unsafe in their travels and their circuitous route to the U.S. was further straining border resources. That led to the “Uniting for Ukraine” policy, under which 128,000 people have been allowed into the U.S., with tens of thousands more approved to come. And the number of Ukrainians coming on foot essentially stopped.

“We built at incredible speed and it proved successful,” Mayorkas said.

The administration turned its focus to other people coming to the border illegally who could not be easily returned to their home countries. Venezuelans had become the second-largest nationality at the border after Mexicans, and in October 2022, they became the second group where the policy would apply. If they crossed illegally on foot, 24,000 would be returned back over the border to Mexico. If they came by air, with sponsors, the U.S. would take in 24,000.

Meanwhile, Cubans and Nicaraguans had pushed illegal crossings to the highest levels on record in December, as Fox News aired live reports of hundreds of waiting migrants under the banner: “Biden’s Border Crisis.”

Republican-led states had sued to keep the COVID-19 restrictions in place. And Biden officials were waiting to see if a bipartisan immigration bill in Congress could actually pass. It didn’t.

So in January, Biden announced the policy would be expanded again to people from Cuba, Haiti and Nicaragua, and they increased the number of people: 30,000 from each of the four nationalities would be allowed in as long as they flew in, met background checks and had sponsors. Mexico agreed to take the same number back from those four countries who cross the border illegally.

“We can’t stop people from making the journey, but we can require them to come here in an orderly way under U.S. law,” Biden said in announcing the policy.

Soon, the administration was reporting that Cubans, Haitians, Nicaraguans and Venezuelans made up only 3% of illegal crossings in March, down from 40% in December.

The U.S. has now declared the COVID-19 emergency over, and the restrictions will end this week that have allowed U.S. officials to turn away migrants more than 2.8 million times since March 2020.

The Biden administration has bolstered its centerpiece policy with other moves meant to clamp down at the border and open up other pathways for migrants.

Last week, the administration said it would admit 100,000 people from Guatemala, Honduras and El Salvador who come to be reunited with their families in the U.S. New immigration hubs in Guatemala, Colombia and perhaps elsewhere will field applications to come to the United States.

But border officials are also speeding up the process asylum seekers go through, to more quickly expel those who fail. And it’s finalizing a new rule — similar to a Trump policy that was blocked in court — to make obtaining asylum extremely difficult for anyone who passes through another country, like Mexico, to reach the U.S. border.

Meanwhile, the number of Venezuelans illegally crossing the border is rising again. Administration officials are waiting to see whether it’s a temporary blip related to the end of COVID-19 restrictions.

Mayorkas acknowledged the concerns during a tour of Texas’ Rio Grande Valley last week. In the end, he said, nothing is a substitute for congressional action.

“We have a plan, we are executing on that plan,” Mayorkas said. “Fundamentally, however, we are working within a broken immigration system that for decades has been in dire need of reform.”

Colleen Long and Elliot Spagat

Associated Press

WASHINGTON, DC

Lopez Mills (AP) and Gregory Bull (AP)