Mexico's new President Andres Manuel Lopez Obrador campaigned to protect the human rights of migrants.

Lopez Obrador, who took office Dec. 1, vowed not to do the "dirty work" of the United States after President Donald Trump demanded Mexico stop migrant caravans before they reach the southern U.S. border.

But a series of increasingly tough actions in Mexico suggest Lopez Obrador has turned his back on those promises and is tacitly cooperating with the Trump administration to stop the flow of Central American migrants passing through Mexico to seek asylum in the U.S.

In Tijuana, immigrant advocates have accused the Lopez Obrador administration of accommodating the Trump administration's new "Remain in Mexico" program despite publicly claiming the U.S. acted unilaterally. The program forces asylum-seekers to stay in Mexico while their asylum claims are pending in the United States. It has drawn legal challenges from multiple groups in the U.S. who contend the program violates the law and puts migrants in danger.

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

Read more:Mexico to pump $30 billion into Central America to halt migrant flow

In January, Mexican officials, apparently acting under pressure from the U.S., denied entry to two U.S. attorneys who provided legal advice to asylum-seekers, and also refused entry to several journalists who had photographed the large migrant caravan that arrived in Tijuana in November.

Mexican federal immigration authorities recently arrested and deported several people who had been helping coordinate migrant caravans as they passed through Mexico on their way toward the U.S.

On Feb. 15, videos posted on social media showed police shoving and punching migrants outside a shelter in Mexico City. In denouncing the incident, human-rights groups called the incident part of a growing "pattern of harassment" by various levels of the government against "human rights defenders" and migrants seeking to organize themselves.

Read more:The Trump administration keeps breaking up migrant families. Here's how it does it

More:Nearly 2,000 migrants arrive at Texas-Mexico border, prompting 500 state troopers to respond

Most recently, when about 2,000 migrants who traveled in the latest caravan arrived in Piedras Negras, hoping to cross the border and seek asylum in Eagle Pass, Texas, Mexican authorities responded by holding them in a makeshift shelter surrounded by a fence and armed officers. Then they dispersed the migrants by bus to other parts of the border.

Some say recent actions suggest Lopez Obrador is coordinating with U.S.

The recent actions in Piedras Negras and other parts of Mexico seem to show that the Lopez Obrador administration is working closely with the Trump administration to help the United States block migrants from asking for asylum in the U.S., despite the Mexican president's promises to stand up to Trump, said David Shirk, a professor of political science and international relations at the University of San Diego.

Shirk also noted that Lopez Obrador has refrained from criticizing Trump's declaration of a national emergency to fund the construction of additional barriers along the U.S.-Mexico border, which Shirk said will push migrants to take more dangerous treks.

"These two governments have decided that, despite very significant policy differences and ideological orientations, they have essentially opted for an alliance of convenience in what arguably otherwise under previous presidents would clearly be a major crisis on the U.S.-Mexico border," Shirk said. "... If this were happening in the 1980s, Mexican presidents would express very public outrage."

Read more:National emergencies are common; declaring one for a border wall is not

Read more:Follow the money: How President Trump's national emergency will pay for a border wall

In doing the United States' bidding on immigration, Lopez Obrador, appears to be trying to avoid a confrontation with the Trump administration in order to focus on domestic issues he views as more pressing, such as battling inequality, corruption and violence, Shirk said.

"It allows him to focus on his actual policy priorities without getting dragged into a prolonged and potentially very dangerous conflict with the Trump administration," Shirk said. "Unfortunately, the losers, the downside, is that thousands of (migrants) are having their lives placed in jeopardy by acquiescing to Trump administration border policies."

Expert: Lopez Obrador not upfront about 'Remain in Mexico' cooperation

Lopez Obrador has not been upfront about the ways his administration is seemingly cooperating with the Trump administration's border policies, said Guadalupe Correa-Cabrera, a professor at George Mason University and an expert on U.S.-Mexico relations.

The Trump administration's "Remain in Mexico" policy has essentially turned Mexico into a dumping ground for asylum-seekers, she said.

"It seems like the Mexican government has not been honest with the Mexican people" about what sort of agreement it has with the United States over the treatment of migrants, she said.

But she is critical of groups such as Pueblo Sin Fronteras, which has helped coordinate migrants into caravans as they pass through Mexico bound for the U.S.

Organizers say they help coordinate caravans because traveling in large groups is safer for migrants at risk of being preyed upon by criminals and corrupted officials.

But Correa-Cabrera believes the groups are using migrants for political purposes, something Pueblo Sin Fronteras has denied.

Nevertheless, the caravans, she said, have made it difficult for Lopez Obrador's administration to implement more welcoming policies.

"The Mexican government said, 'Yes, they are going to deal with this in a different way,' but they were not expecting caravans and caravans and caravans," she said.

At the same time, the caravans have played into Trump's political hands, she said, by providing justification for his border wall and other border policies aimed at deterring migrant families and unaccompanied minors — mostly from Honduras, El Salvador and Guatemala — from making the trip north to the United States.

"Who is stuck in the middle? The migrants," she said.

Others say Lopez Obrador still committed to helping migrants

Some human-rights advocates believe Lopez Obrador remains committed to his campaign promises to be more welcoming to migrants.

In January, the Lopez Obrador administration offered to provide humanitarian visas after a new migrant caravan from Central America crossed into Mexico.

The program showed a different attitude towards asylum-seekers than the previous government, said Maureen Meyer, of the Washington Office on Latin America, a human-rights advocacy group.

Read more:'I’m scared for my life': Residents vexed by surge of migrants in tiny town near border

However, Mexico was forced to shut down the program after more than 12,000 people applied.

Ending the program highlighted how the Lopez Obrador administration has struggled to reconcile more welcoming policies with the challenges Mexico faces dealing with the rising number of migrant caravans entering Mexico. The caravans are made up largely of Central American migrants fleeing poverty and violence.

"I think there is a will from a lot of Mexican officials to do things differently, but they lack the resources to do things differently, and they are trying to enact significant changes while at the same time addressing large flows of people in caravans," said Maureen Meyer, of the Washington Office on Latin America, a human rights advocacy group. "It's a challenge they have not quite effectively been able to address."

Those challenges, Meyer said, have been compounded by the Trump administration's unilateral policies forcing "hundreds and thousands of people to be stuck in Mexican border towns" awaiting appointments to ask for asylum or after they were sent back while they wait for their asylum claims to be processed in courts.

At the same time, Meyer has been alarmed by several recent actions taken by the Mexican government seemingly under pressure by the United States, notably refusing entry to asylum lawyers and journalists.

"I think that is extremely concerning because no one should be denied entry into a country when they are working to promote human rights of others," she said.

Meyer said she was also concerned about reports of migrants being abused by police and caravan organizers being deported.

If the Lopez Obrador administration really wants to be recognized as a government that respects migrants’ rights and is intolerant of abuse, she said, then it must investigate the multiple allegations of abuse that have occurred in recent months, sanction those responsible, and clarify the criteria it is using to deny entry of select lawyers, journalists and others "working to support asylum seekers and members of the caravans."

Have ideas about immigration or border coverage? Reach the reporter on Twitter or Facebook or at daniel.gonzalez@arizonarepublic.com