President Donald Trump’s threat to hit Mexico with new tariffs unless that government stops the flow of asylum seekers to the U.S. has reportedly sent officials from both countries scrambling to come up with solutions on illegal immigration, in the face of potentially mutual economic harm.

The president announced last week that he would impose a 5-percent tariff on all goods imported from Mexico on June 10 if the country doesn’t respond to the surge of Central American asylum-seekers at the southern U.S. border.

READ MORE: GOP senators line up against Trump’s Mexico tariff plan

Trump has threatened to take other actions before, such as closing down the border entirely, without following through in the end. But the latest deadline comes as a recent spike in migrant families is overwhelming U.S. detention facilities.

Over the past year, tens of thousands of Central Americans, many of them fleeing violence in their home countries, have sought asylum in North America. The number of families stopped by U.S. Customs and Border Protection at the U.S.-Mexico border jumped by 400 percent this past April from the previous year, with the majority of the migrants coming from Guatemala, Honduras and El Salvador.

Trump has pointed to the spike in asylum seekers to publicly rebuke Mexico for the crisis. But top U.S. officials, including Department of Homeland Security Secretary Kevin McAleenan, have indicated a willingness to work with the country to find a fix.

Here are a few ways that experts believe the two countries could find common ground on the issue.

Crack down on smuggling networks by sharing intelligence

Many of the migrants traveling from Central America to the U.S.-Mexico border rely on some sort of human smuggling network. RAND estimates that human smugglers operating along the Central America-U.S. made somewhere between $200 million to $2.3 billion in 2017, with a large share of the profits ending up in the hands of transnational criminal organizations with ties to the drug trade.

“There’s more that the two countries could do [in] targeting alien smugglers,” said Jeffrey Davidow, who served as U.S. ambassador to Mexico from 1998 to 2002.

Just last month, McAleenan formalized an agreement with the government of Guatemala to target traffickers operating within the country.

But Mexico and the U.S., the region’s two most powerful countries, could engage in more “intelligence development and intelligence sharing” about smuggling networks, argued Christopher Wilson, the deputy director of the Mexico Institute at the Wilson Center in Washington, D.C.

For example, “there’s increasingly a use of busses to move migrants through Mexico in a rapid way, and many are managed by smuggling networks,” Wilson said. “With intelligence they could go after it and really try to shut that down.”

Address the root cause of the problem by offering aid to Central America

El Salvador, Honduras and Guatemala are plagued by gang violence and consistently rank as some of the most dangerous countries in the world, with high levels of crime and underfunded government institutions. By addressing the “economic push factors for migration,” Wilson said, Mexico and the U.S. could help alleviate the pressure.

On a trip to Washington this week, Mexican Foreign Minister Marcelo Ebrard promoted an aid plan that would put $30 billion toward development projects in the Northern Triangle countries. The U.S. committed $5.8 billion toward this “Marshall Plan” for Central America last December, but the U.S. has not moved as quickly on allocating the aid as Mexican officials would have liked.

Despite having committed to collaboration with Mexico on development projects in Central America, the U.S. has actually cut off aid previously provided by other government sources. In April, the State Department told Congress that it planned to cut off millions of dollars that had previously gone to Guatemala, Honduras and El Salvador.

President Trump’s move to cut $500 million in aid has limited “programs that would actually help address why people are leaving their countries,” said Maureen Meyer, director for Mexico and Migrant Rights at the Washington Office on Latin America.

But others said beneath the rhetoric and planned cuts there were signs the U.S. and Mexican governments were interested in working together. “There’s both a willingness and a desire to find a solution,” Wilson said.

On the U.S. side, expedite the asylum process

The surge of migrants seeking asylum in the U.S. has created a huge backlog in the immigration courts. As of April, there were nearly 900,000 immigration cases pending throughout the country.

Following the implementation of Trump’s “Remain in Mexico” policy, which was put in place in December and requires illegal immigrants to return to Mexico while their proceedings are processed, thousands of these asylum-seekers have been sent back to the country to await the outcome of their cases. The U.S. has also started implementing a separate policy called “metering,” which limits the number of asylum seekers who are allowed to enter the country from Mexico each day.

Because of this, “there’s a huge number of asylum seekers stuck on the Mexican side of the border, waiting to have their claims processed,” Wilson said.

“Just as U.S. shelters are full, Mexican shelters are full and at capacity,” he added.

The U.S. could increase the number of immigration court judges in order to bring down the number of asylum-seekers waiting in limbo for their claims to be processed, Davidow said.

“We are facing this situation with an immense backlog of asylum claims, with very few people to handle those claims,” he said.

On the Mexico side, continue with enhanced surveillance of migrants

Despite Trump’s claims that Mexico is doing very little to address the crisis, reports indicate that the Mexican government has taken significant steps to crack down on the flow of migrants traveling north through the country.

“It’s certainly very short-sighted to say they’re not doing anything. I think they are doing quite a bit,” said Meyer. For instance, Meyer said, Mexico had made a larger effort in recent months to raid hotels and other areas where migrants are known to stay while in transit.

President Andrés Manuel López Obrador issued thousands of humanitarian visas to asylum-seekers in the first months after he took office late last year. But his administration has also stepped up efforts to detain and deport more migrants, including putting 12,000 immigrants in detention in the month of April alone.

This marks a significant change in Mexican policy from recent years, Davidow said. “Traditionally, up until this latest crisis, Mexicans have sort of ideologically been opposed to stopping Central Americans from moving [through the country to the U.S.] There was a certain sympathy. I think that has largely disappeared,” he said.

If Mexico continues detaining and deporting Central American migrants at the current level, it could curb the flow of asylum-seekers traveling to the southern U.S. border. But the “huge question mark” that remains, said Wilson, “is whether that’s going to be enough, soon enough, for President Trump.”