A group of Central Americans crossed into Mexico in March as part of a migrant "caravan" heading to the United States border.
CNN
A group of Central Americans crossed into Mexico in March as part of a migrant "caravan" heading to the United States border.
Now playing
02:07
Donald Trump: No more DACA deal
President Donald Trump addresses the 73rd session of the United Nations General Assembly, at U.N. headquarters, Tuesday, Sept. 25, 2018. (AP Photo/Richard Drew)
Richard Drew/AP
President Donald Trump addresses the 73rd session of the United Nations General Assembly, at U.N. headquarters, Tuesday, Sept. 25, 2018. (AP Photo/Richard Drew)
Now playing
01:17
Trump to migrants: Make your nations great again
Central American immigrants depart ICE custody, pending future immigration court hearings on June 11, 2018 in McAllen, Texas. Thousands of undocumented immigrants continue to cross into the U.S., despite the Trump administration's recent "zero tolerance" approach to immigration policy.  (Photo by John Moore/Getty Images)
John Moore/Getty Images
Central American immigrants depart ICE custody, pending future immigration court hearings on June 11, 2018 in McAllen, Texas. Thousands of undocumented immigrants continue to cross into the U.S., despite the Trump administration's recent "zero tolerance" approach to immigration policy. (Photo by John Moore/Getty Images)
Now playing
01:06
Judge blocks asylum seekers from deportation
Pool
Now playing
01:51
Trump: I prefer shutdown before midterms
CHICAGO, IL - JUNE 29:  Demonstrators hold a rally in the Little village neighborhood calling for the elimination of the U.S. Immigration and Customs Enforcement (ICE) and an end to family detentions on June 29, 2018 in Chicago, Illinois. Protests have erupted around the country recently as people voice outrage over the separation and detention of undocumented children and their parents.  (Photo by Scott Olson/Getty Images)
Scott Olson/Getty Images North America/Getty Images
CHICAGO, IL - JUNE 29: Demonstrators hold a rally in the Little village neighborhood calling for the elimination of the U.S. Immigration and Customs Enforcement (ICE) and an end to family detentions on June 29, 2018 in Chicago, Illinois. Protests have erupted around the country recently as people voice outrage over the separation and detention of undocumented children and their parents. (Photo by Scott Olson/Getty Images)
Now playing
01:30
HHS refusing to release family separation stats
Now playing
01:01
Reporter to Sarah Sanders: Why did Trump lie?
Now playing
01:28
Trump: ICE agents are mean but have heart
Pool
Now playing
01:23
Trump: Our facilities better than Obama's
trump king of jordan visit
CNN
trump king of jordan visit
Now playing
01:15
Trump: No regrets signing executive order
Immigrant children walk in a line outside the Homestead Temporary Shelter for Unaccompanied Children, a former Job Corps site that now houses them, on Wednesday, June 20, 2018, in Homestead, Fla. (AP Photo/Brynn Anderson)
Brynn Anderson/AP
Immigrant children walk in a line outside the Homestead Temporary Shelter for Unaccompanied Children, a former Job Corps site that now houses them, on Wednesday, June 20, 2018, in Homestead, Fla. (AP Photo/Brynn Anderson)
Now playing
01:54
Children in limbo after Trump executive order
Secretary of State Mike Pompeo listens as President Donald Trump speaks during a cabinet meeting at the White House, Thursday, June 21, 2018, in Washington. (AP Photo/Evan Vucci)
Evan Vucci/AP
Secretary of State Mike Pompeo listens as President Donald Trump speaks during a cabinet meeting at the White House, Thursday, June 21, 2018, in Washington. (AP Photo/Evan Vucci)
Now playing
02:18
White House chaos over immigration reversal
Watched by Homeland Security Secretary Kirstjen Nielsen (L) and Vice President Mike Pence, US President Donald Trump signs an executive order on immigration in the Oval Office of the White House on June 20, 2018 in Washington, DC. - US President Donald Trump on Wednesday signed an executive order aimed at putting an end to the controversial separation of migrant families at the border, reversing a harsh practice that had earned international scorn."It's about keeping families together," Trump said at the signing ceremony. "I did not like the sight of families being separated," he added. (Photo by Mandel Ngan / AFP)        (Photo credit should read MANDEL NGAN/AFP/Getty Images)
MANDEL NGAN/AFP/Getty Images
Watched by Homeland Security Secretary Kirstjen Nielsen (L) and Vice President Mike Pence, US President Donald Trump signs an executive order on immigration in the Oval Office of the White House on June 20, 2018 in Washington, DC. - US President Donald Trump on Wednesday signed an executive order aimed at putting an end to the controversial separation of migrant families at the border, reversing a harsh practice that had earned international scorn."It's about keeping families together," Trump said at the signing ceremony. "I did not like the sight of families being separated," he added. (Photo by Mandel Ngan / AFP) (Photo credit should read MANDEL NGAN/AFP/Getty Images)
Now playing
02:49
What's next after Trump's policy reversal?
Trump meeting 06202018
POOL
Trump meeting 06202018
Now playing
02:33
Trump reverses position on family separations
President Donald Trump signs an executive order to keep families together at the border, but says that the 'zero-tolerance' prosecution policy will continue, during an event in the Oval Office of the White House in Washington, Wednesday, June 20, 2018. Standing behind Trump are Homeland Security Secretary Kirstjen Nielsen, left, and Vice President Mike Pence. (AP Photo/Pablo Martinez Monsivais)
Pablo Martinez Monsivais/AP
President Donald Trump signs an executive order to keep families together at the border, but says that the 'zero-tolerance' prosecution policy will continue, during an event in the Oval Office of the White House in Washington, Wednesday, June 20, 2018. Standing behind Trump are Homeland Security Secretary Kirstjen Nielsen, left, and Vice President Mike Pence. (AP Photo/Pablo Martinez Monsivais)
Now playing
01:52
Trump signs executive order to end family separations
CNN
Now playing
01:18
Trump: Take children away to prosecute parents
THE PRESIDENT meets with the National Space Council  In-House Pool (Pre-set 9:30AM | Final Gather 11:15AM -- Palm Room Doors)
Pool
THE PRESIDENT meets with the National Space Council In-House Pool (Pre-set 9:30AM | Final Gather 11:15AM -- Palm Room Doors)
Now playing
01:40
Trump: The US will not be a migrant camp
(CNN) —  

President Donald Trump on Monday attacked the Mexican government for not doing enough to stop migration to the US – but immigration rights activists for years have complained that Mexico is in fact doing too much.

The Mexican government has been stopping nearly as many Central Americans in recent years as the US, working closely with the US government to jointly control the southern border.

The migration of Mexicans into the US has been declining for years, with more Mexicans leaving the US than arriving. But the journey for Central Americans fleeing violence and poverty in their home countries to sneak into the US or seek asylum there goes squarely through Mexico, which has caused the US and Mexican governments in recent years to try to stop more of the migrants before they reach the US.

Once they arrive at the US border, migrants can legally claim they qualify for asylum and, if they meet the threshold credibility test, they can pursue their claims in a court process that usually takes years to complete, during which time many can live and work in the US.

But Trump spent Sunday and Monday tweeting against Mexico’s efforts.

“Mexico is doing very little, if not NOTHING, at stopping people from flowing into Mexico through their Southern Border, and then into the U.S. They laugh at our dumb immigration laws. They must stop the big drug and people flows, or I will stop their cash cow, NAFTA. NEED WALL!,” Trump tweeted Sunday.

“Mexico has the absolute power not to let these large ‘Caravans’ of people enter their country. They must stop them at their Northern Border, which they can do because their border laws work, not allow them to pass through into our country, which has no effective border laws,” he continued on Monday, slightly more favorably to Mexico, adding later, “Mexico is making a fortune on NAFTA…They have very strong border laws - ours are pathetic.”

According to statistics from the US and Mexican governments compiled by the nonpartisan Migration Policy Institute, Mexico in 2015 apprehended tens of thousands more Central Americans in its country than the US did at its border, and in 2015 and 2016 it deported roughly twice as many Central Americans as the US did.

In the past two years, Mexico has lagged behind the US in apprehensions, but Migration Policy Institute President Andrew Selee, an expert on Mexican policy, said that could be due to a number of factors including smugglers successfully changing their routes to avoid detection or relations with Trump.

Even a recent Department of Homeland Security study concluded this fall that “available data indicate that the southwest land border is more difficult to illegally cross today than ever before.”

Selee warned that interrupting the cooperation between the US and Mexico could be dangerous for the US.

“They’re actually increasingly trying to manage the border together, and part of the reason the border is more in control now than it’s ever been is that the US and Mexican governments work together now more than ever – and the last thing the US needs now is to blow up that cooperation,” Selee said.

In 2014, Mexico unveiled a policy it called Frontera Sur, or Southern Border. The program called for a crackdown on the flow of Central American migrants and smuggling routes. But advocates say the government had been trending this way previously, even as the policies remain unpopular with Mexican citizens, according to Selee.

Advocacy groups have been sounding the alarm about the high rate of Mexican apprehensions and deportations in recent years, saying that the government is actually jeopardizing these migrants’ human rights by denying them the ability to make asylum claims, failing to protect them from victimization while traveling through Mexico, and then sending them back to life-threatening conditions at home.

“Frontera Sur institutionalized a policy of enforcement, but the violations of Central American migrants that were ongoing and not facilitating access for them to request protection have been ongoing,” said Daniella Burgi-Palomino, a senior associate at the civil society activist Latin America Working Group. “Mexico has continued this … very harsh enforcement policy over the last couple years. It’s already doing that job, it doesn’t need any more pressure from the US to do its job.”

CNN’s Catherine Shoichet and Leyla Santiago in Mexico City contributed to this report