Mexico has been seen for years as the country Central Americans must travel through to reach the United States.

But Mexico has been quietly taking steps to become the final destination for those migrants. Christopher Gascon, the top official working in Mexico as part of the United Nations' International Organization for Migration, said Mexico has been funding projects that will help the country take in thousands of people from Central America, and said the U.N. is looking to help.

"Our concentration is on integration and looking to support the government of Mexico in its longer-term plans in having a program in Mexico to absorb large groups of migrants," Gascon told the Washington Examiner. "If Mexico can absorb a fair amount of the people coming in ... but we also want to see how we can improve their conditions."

Gascon said the long-term effect, if successful, will be a dip in the number of Central Americans illegally crossing into Mexico, and in turn, doing so at the U.S.-Mexico border.

"That number is going to be much lower than it used to be," he said.

Gascon said the administration of Mexican President Andres Manuel Lopez Obrador has been successful in enticing some people from El Salvador, Guatemala, and Honduras to permanently remake their lives in Mexico instead of the U.S.

[Related: Nearly 12,000 Central American migrants in Mexico have gone back since January]

"Mexico is now becoming more of a destination country and working more in that sense," Gascon said in a phone call. "The idea is how to build the capacity in Mexico. Inevitably some people will still want to reach the U.S., but that access is not easy."

The emergence of "caravans," or groups of 1,000 people or more traveling together, and the success those groups have had in safely traveling through Mexico and to the U.S. in 2018 has prompted more people to try. Illegal immigration into the U.S. hit a 12-year high in February.

President Trump pressured the incoming Mexican president to do more than his predecessor, and Mexico has, but for its own benefit, Gascon said.

The Mexican government in January started issuing visitor cards to Central Americans, which gave them the legal ability to reside and work in the country on a semi-permanent basis. The government stopped taking applications last month after issuing 13,000 cards to people from caravan members who were in Tijuana, Piedras Negras, and other cities.

[Also read: Mexico deploys militarized police to block 2,000 migrants from entering Texas]

Gascon said the government could not keep approving people to work in Mexico if those newly created jobs did not exist yet, but the public's response indicated people were interested in taking Mexico up on its offer.

"This was a little faster than what we had envisioned. People jumped on that opportunity very quickly," he said. "Right now, Mexico is looking again at how to improve their capacity … A lot has to do with longer term projects which the government has in mind to develop the southern region of Mexico."

Those projects include a refineries and a construction project to build railroad infrastructure for the Maya train to run across the Oaxaca state's Isthmus of Tehuantepec.