The Biden administration has agreed to supply Mexico with excess doses of the coronavirus vaccine, and Mexico is moving to help the United States contain a migration surge along its southern border, according to senior officials from both countries involved in the conversations.

The decision to send AstraZeneca vaccine to Mexico, and to Canada, is expected to be announced Friday. Mexican President Andrés Manuel López Obrador and Canadian Prime Minister Justin Trudeau had asked President Biden to help them fill vaccine shortfalls in recent talks.

Mexican and U.S. officials who described the agreement said it was not a quid pro quo conditioning the delivery of vaccines on an enforcement crackdown. Rather, the United States made clear it sought help from Mexico managing a record influx of Central American teenagers and children. Mexico pledged to take back more Central American families “expelled” under a U.S. emergency health order, while also urging Biden to share the U.S. vaccine supply, said the officials, who spoke on the condition of anonymity because they were not authorized to discuss the conversations.

A White House official said that “currently, we are assessing how we can loan AZ doses to both Canada and Mexico” and “assessing the feasibility” with companies.

“Our top priority remains vaccinating the U.S. population, but the reality is that this virus knows no borders and ensuring our neighbors can contain the virus is mission-critical to protecting the health and economic security of Americans and for stopping the spread of covid-19 around the globe,” the official said.

On Thursday morning, after this story was published, Mexican Foreign Minister Marcelo Ebrard confirmed that Mexico would receive vaccines from the United States.

“They ask me if it is true that there is a vaccine agreement with the United States to follow up on the conversation between Presidents López Obrador and Biden. Yes, the information is correct. Tomorrow at 9 am I will give you the details because we are still working on it. Good news!” he wrote in a tweet.

The requests for more migration cooperation fit an increasingly familiar pattern in which the United States turns to the Mexican government for enforcement help during moments of crisis.

In recent weeks, Mexico has staged and publicized a number of anti-migration operations, largely along its southern border with Guatemala. Mexico’s national guard has raided the northbound trains that Central American teenagers ride to the U.S. border; stopped migrants with counterfeit United Nations documents; and detained migrants crammed in trailers.

Those kinds of operations are not new in Mexico, but they have increased in recent weeks, according to current and former Mexican officials, as the number of Central American migrants passing through the country has grown. Mexican officials have said its immigration enforcement actions are conducted independently of the United States, with an aim to applying its own laws regulating the flow of migrants.

A more visible Mexican immigration enforcement effort is expected to be announced soon, according to current and former Mexican officials.

“It seems that what we’re going to see in the coming days is a reactivation of the Mexican immigration enforcement that Trump negotiated and pressured in 2019. But it appears that the new agreement is with the Biden government, as a reaction to increased migratory flows,” said Tonatiuh Guillén, the former head of Mexico’s migration agency who resigned in 2019.

The new enforcement effort will consist partially of a larger deployment of Mexico’s national guard and — unlike the train raids — will more closely target migrants traveling with smugglers, often in private vehicles.

Roberto Velasco, a spokesman for Mexico’s Foreign Ministry, said the two countries “share the common objectives of addressing the root causes of migration in Southern Mexico and Northern Central America and that of fighting covid-19.”

“On the one hand, both governments cooperate on the basis of an orderly, safe and regular migration system,” Velasco said in an interview. “On the other hand, our governments cooperate against covid-19, from regulating our supply chains to running clinical trials of vaccines against covid-19 in both Mexico and the U.S.”

“However, these are two separate issues, as we look for a more humane migratory system and enhanced cooperation against covid-19, for the benefit of our two countries and the region,” he said.

Biden said Tuesday that the administration was “talking with several countries” about the U.S. stockpiled doses of the British-developed AstraZeneca product, which has not been approved for use in the United States. Appeals have also come from Europe.

U.S. officials said that the decision was never whether to share vaccine, but rather when it was determined that there was enough to meet all American needs first. That determination was made last week, following FDA approval of a third vaccine, by Johnson & Johnson, in addition to those produced by Pfizer-BioNTech and Moderna.

The United States is well ahead of virtually all other countries in the number of total covid deaths, but is now also at the top of the list of vaccine distribution. Biden said last week that all Americans 18 and over would be eligible to receive doses by May 1.

In recent weeks, Ebrard has worked closely with Secretary of State Antony Blinken as well as Roberta Jacobson, the former U.S. ambassador to Mexico who Biden has named as a southern border coordinator, officials from both countries said.

“It’s not a quid pro quo, it’s a parallel negotiation,” said a senior Mexican diplomat who was not authorized to discuss the conversations. “If there is no mass vaccination campaign in Mexico, it makes it more difficult to open the border to nonessential activities. So vaccinations in Mexico are a benefit to the U.S.”

Similarly, the diplomat added, “if migration is under control, it diminishes the image of a crisis, and facilitates the approval of immigration reforms that are key for both countries.”

Homeland Security Secretary Alejandro Mayorkas hinted at possible help from Mexico in a statement issued Tuesday. “We are working with Mexico to increase its capacity to receive expelled families,” he said, without going into detail, while warning the United States is “on pace to encounter more individuals on the southwest border than we have in the last 20 years.”

Mexican officials have told the Biden administration they are willing to alter or delay the implementation of a law passed in November that limits their ability to detain minors.

Mexican officials cited that law in late January when they stopped taking back some family groups the United States was seeking to return across the border using the public health authority known as Title 42 that President Donald Trump implemented last March.

The law requires children to be held in family-appropriate shelters. Mexican officials have told U.S. authorities those facilities have been full in the northern state of Tamaulipas, opposite South Texas, and it could not take back parents with younger children.

As a result, the Biden administration began releasing the families, and soon word spread that parents with young children crossing into the Rio Grande Valley were being accepted into the United States. The number of migrants arriving as part of family groups is on pace to reach 40,000 this month, a nearly tenfold increase since December, the latest U.S. Customs and Border Protection data show.

López Obrador last week told reporters that many Central Americans see Biden as the “migrant president” who will allow them to fulfill dreams of reaching the United States.

During the conversations with the Biden team, Mexican officials encouraged the Americans to deliver clearer deterrent statements to discourage Central Americans from attempting the journey north. Both sides agreed that there are limits to what Mexico can do, and that the U.S. can improve its messaging to deter migrants.

Increased Mexican enforcement would only reduce the current volume of migration by about one-third, according to a former U.S. official with knowledge of the deal. Mexico’s agreement to accept more families is potentially more impactful, the former official said, because it will potentially ease pressure on U.S. agents, who have struggled as families with young children arrive in groups of 100 or more, similar to the 2018-2019 surge.

At the peak that crisis, as record numbers of Central American families crossed the border, President Trump lashed out at the Mexican government with tariff threats, coercing López Obrador into launching out a militarized crackdown with National Guard forces.

Mexico also agreed to a major expansion of the “Remain in Mexico” policy, allowing the United States to send more than 70,000 asylum-seekers back across the border to wait outside U.S. territory while their asylum cases were pending.

Officials from both countries have highlighted shared goals for López Obrador and Biden on addressing “root causes” of migration by boosting job creation in Central America. Biden has announced a $4 billion plan to effort to work with Mexico on developing the region, as well as efforts to settle asylum seekers in other nations closer to their home countries with help from the United Nations refugee agency.

Several European countries suspended use of the AstraZeneca vaccine after a handful of recipients reported adverse effects, including blood clots. The European Medicines Agency, which has been evaluating the reports, said Thursday that the vaccine was safe and effective, although it did not rule out a link between the vaccine and the rare blood cuts, which it said should be included in AstraZeneca information. The FDA is waiting for data from a large, 32,000 person trial before deciding whether to approve it for U.S. use.

The Trump administration signed a contract for 300 million doses in May 2020. An estimated 7 million doses are stockpiled.

Under a contractual agreement with AstraZeneca, the United States has officially requested permission to ship doses it has already purchased to Mexico and Canada; quick agreement is expected.

Before the safety concerns arose, European governments had also asked the administration to provide the excess AstraZeneca doses. But U.S. officials said that Mexico and Canada, both with a shared U.S. border, spikes in covid-19 and problems with lagging vaccine delivery, have long been at the top of the priority list.

Neither country produces its own vaccine. Mexico has already received vaccines from China, Russia and India. With delayed deliveries from Pfizer, López Obrador asked Biden for what he called a “loan” of AstraZeneca vaccines when the two leaders held a virtual meeting on March 1.

“We are hoping for the help, support and solidarity of the U.S. government,” the Mexican leader said in a news conference this week. Mexico has seen more than two million cases of the virus, and close to 200,000 deaths. Ebrard told reporters that “we requested as many doses as possible” in conversations with U.S. officials.

Secretary of State Blinken has been in near constant contact with Ebrard, perhaps more than with any other counterpart, and officials said the administration has been pleasantly surprised by the responsiveness of Mexico so far, according to U.S. officials who spoke on condition of anonymity about the sensitive diplomacy. The administration had felt some trepidation about dealing with López Obrador, a populist leader who developed cordial ties with Trump.

But Biden was said to have reached out to him in a spirit of cooperation, and recognition that shared problems would have to be overcome together. In particular, Biden’s young administration was almost immediately faced with a new flood of immigrant families and youthful border-crossers, many drawn by his initial steps to reverse Trump’s draconian migration policies.

“There’s a long and complicated history between our nations, and haven’t always been perfect neighbors with one another,” Biden said in remarks with the Mexican president before their meeting. “But we have seen over and over again the power and the purpose when we cooperate. And we’re safer when we work together, whether it’s addressing the challenges of our shared border or getting this pandemic under control.”

Mexico and Canada are the two largest U.S. trading partners, and economic relationships have been severely disrupted by covid-related border shutdowns, in addition to the migration situation.

Since Biden’s virtual meeting late last month with Trudeau, U.S. Cabinet secretaries have spoken regularly with Canadian ministers, as both sides moved to repair the tense relationship established under Trump. As covid-19 spread exponentially in the United States, Canada closed its border a year ago to all but essential U.S. travel and trade.

Francois-Phillippe Champagne, Canada’s minister of innovation, science and industry, said he raised the subject of vaccines again this week in a conversation with Commerce Secretary Gina Raimondo.

Vaccination, Champagne said in an interview with The Canadian Press, “is the best way to ensure the health and safety of the people and eventually be in a position to reopen the economy.”

“I think what you see is a renewed sense, or renewed spirit, of cooperation and collaboration, to protect the health and safety of people on both sides, but also to foster jobs and growth on both sides of the border,” he said.

Sieff reported from Mexico City.