David Agren

Special to USA TODAY

MEXICO CITY — The Mexican government has announced plans to spend $30 billion over the next five years on Central American development, an initiative designed to slow migration from some of the hemisphere's poorest and most violent countries through Mexico and toward the United States.

Exact details were still pending on how the money would be disbursed, but the Mexican Foreign Ministry said in a tweet Monday that Mexico "will change its migration policies to respond to the needs required in the south of our country and Central America."

The Mexican announcement comes as more 5,000 Central American migrants traveling in caravans have congregated in Tijuana, where many had hoped to make asylum claims in the United States, but face waiting lists of more than several months.

And it serves as an early test of the relationship between new Mexican President Andrés Manuel López Obrador and President Donald Trump, who has already cut aid to Central America and vowed to halt all foreign aid to the region if the caravan wasn't stopped.

The two leaders have maintained cordial relations. But as a candidate, López Obrador vowed that he "will not do the dirty work of any foreign government," a clear swipe at demands Trump was imposing on Mexico to stop the migrant caravan.

It also comes as an early initiative on the migration issue from López Obrador — who, on the campaign trail, responded to questions on migrants transiting Mexico that his country "will not do the dirty work of any foreign government."

López Obrador hasn’t repeated that pledge since being elected July 1 and has instead proposed a sort of "Marshall Plan" for Central America, which he insists will diminish the need to emigrate in the first place.

"We’re going to guarantee that the rights of migrants in our territory are respected," he told reporters on Dec. 5. "About how to resolve the problem, we’re putting together a proposal to invest in productive projects and job creation. And, not only that, in work visas as well for Mexican and for the United States."

More:Mexico’s new president sworn into office, pledges to curb corruption, bring change

More:New data shows asylum claims spiking at U.S. ports of entry

López Obrador swept into office on a domestic agenda of curbing corruption, combating poverty and reasserting state influence over economic affairs. But the arrival of so many caravan travelers in Tijuana has thrust migration to the top of the bilateral agenda as he starts his six-year administration — during which time he promises "respect" for the United States and Trump.

López Obrador promises to focus the work of Mexico’s network of consulates in the United States on "defending" the millions of Mexicans living north of the border. But focusing on the thousands of Central Americans transiting the country hasn’t proved a priority for successive Mexican administrations, even as asylum claims accumulate and migrants fleeing violence and poverty increasingly see Mexico as a destination country.

"It’s not part of their project. There is very little to gain politically from it," said Carlos Bravo Regidor, a professor at the Center for Research and Teaching in Economics. "Nobody wants to deal with it, it’s very hard to find a solution and very easy to screw up."

Members of the López Obrador administration have negotiated with their U.S. counterparts since before his Dec. 1 inauguration. The Washington Post reported last month that the incoming López Obrador administration and U.S. government had agreed to a plan known as "Remain in Mexico," in which asylum seekers stay in Mexico while their claims are heard in U.S. courts.

Interior Minister Olga Sánchez Cordero denied any deal, saying Mexico would not serve as a "safe third country," which means migrants setting foot in Mexico would be unable to seek asylum in the United States and be required to do so in Mexico instead.

Migration observers say "Remain in Mexico" would serve a similar purpose to Mexico becoming a "safe third country."

"This would be like giving Mexico an excuse to put up a wall and then force people to cross the only way possible, the illegal way," said Gilberto Martínez Amaya, director of a migrant shelter in Tijuana.

Mexico has had moments in its history of welcoming migrants such during the Spanish Civil War. Thousands of Guatemalans also fled to southern Mexico and settled there during a 1980s civil war.

Asylum claims in Mexico have climbed 10-fold over the past five years to 14,596 in 2017 — a figure expected to be easily surpassed this year due to the arrival of several caravans.

Less than 1 percent of the country’s population is foreign-born, however, and attitudes towards migrants can be complicated — especially toward those from poorer countries, said Javier Urbano, a migration expert at the Iberoamerican University.

"The biggest part of the immigration that has arrived here is from groups that are socioeconomically medium or high," Urbano said. "The number of permits the Mexican government gives to Honduras, Guatemala and El Salvador is barely between 2 percent and 3 percent of all the people who ask."

Polls show attitudes toward the caravan are slipping, even though the caravans crossing the country toward Tijuana were met with outpourings of generosity as Mexicans provided everything from food and water to shoes and shelter. A November survey by the newspaper El Universal found 55 percent of respondents wanting the López Obrador administration to "take tougher measures" with future caravans.

In a July letter to Trump, López Obrador pitched the U.S. president on partnering to develop Central America — not unlike what he’s proposed for underdeveloped parts of southern Mexico, where he's planning to build a refinery, two railway lines and plant millions of hectares of trees.

"Such a plan that addresses the political and economic needs of Central Americans would be a more humane response to the regional crisis than additional funds for border walls and family and child detention centers" said Mike Allison, an expert in Central American politics at the University of Scranton.

But he added, "Our Central American partners do not have the best record when it comes to combating corruption and promoting good governance."