 -- As Secretary of State Rex Tillerson and Secretary of Homeland Security John Kelly stepped off a plane in Mexico Wednesday evening, tensions were brewing there over new guidance from the administration about deportations, border patrol and President Trump's long-promised wall on the southern border.

While Kelly's department issued the guidelines, they now threaten to undermine such a high-level trip. Some fear that an immigration crackdown will result, despite the administration's attempts to ensure that mass deportations are not in the works.

The announcement caught the Mexican government by surprise and put officials there on a defensive footing just a day before the visit. But even as the Mexican foreign minister issued a blistering statement, the White House denied that anything was wrong.

“The relationship with Mexico is phenomenal right now,” said White House press secretary Sean Spicer Wednesday.

The foreign trip is the first for Kelly and the second for Tillerson -- although it is his first one-on-one visit to a foreign country.

That’s a sign of how important this relationship is, according to the State Department, and despite the renewed tensions, they are hopeful the visit will be successful in mending the relationship.

So what is on the agenda, and how will Tillerson and Kelly be received?

THE WALL

At the top of the list and the source of much of the tension is the wall.

Trump maintains that Mexico will pay for a wall across the southern U.S. border, a notion which the Mexican government rejects. It’s a fight so bitter that Mexican President Enrique Pena Nieto canceled a visit to the U.S. last month, leaving the White House scrambling to organize a call between the two leaders the next day.

After some tensions were eased with the call, Tillerson and Kelly were charged with rebuilding the relationship with this trip -- but these new immigration enforcement guidelines brought the same disputes back to the forefront.

One of the new implementation memos, signed by Kelly, calls on Customs and Border Protection to “immediately begin planning, design, construction and maintenance of a wall” and tasks the under secretary for management in the Department of Homeland Security with identifying all available resources to pay for it.

But it also asks the under secretary to make a list of all direct and indirect U.S. aid to Mexico from the last five fiscal years. The move raised concerns that the White House would threaten to withhold aid down the line.

A senior administration official would only say that, “The Department of Homeland Security will undergo a review and provide that information back to the President as directed.”

Another senior administration official sought to downplay any tension over border security and said the trip was devised to address these issues.

“The wall is just one part of a broader relationship that we have,” they said. “We have clear differences on the payment issue, but agree that we need to work these differences out as part of a comprehensive discussion on all aspects of the bilateral relationship.”

DEPORTATIONS

Another important component of the immigration guidelines involves deportations -- continuing to prioritize immigrants here illegally who have committed crimes, but opening the door for law enforcement to detain and deport nearly anyone without proper documentation.

In addition, Immigration and Customs Enforcement has now been instructed to deport migrants who traveled through Mexico from elsewhere in Central or South America back to “the foreign contiguous territory from which they arrived.” In other words, if they cross the southern border, the migrants will be sent back to Mexico, regardless of where they came from.

It’s a plan that Mexico opposes, with the Mexican foreign minister issuing a strong statement Wednesday.

“I want to make clear in the most emphatic way that the Mexican government and the people of Mexico do not have to accept provisions that unilaterally one government wants to impose on another, that we will not accept,” said Luis Videgaray, Tillerson’s counterpart.

“The Mexican government is going to act by all means legally possible to defend the human rights of Mexicans abroad, particularly in the United States,” he added.

Tillerson and Videgaray are scheduled to have dinner Wednesday night, along with Kelly, the Mexican Secretary of Defense, and the Mexican Secretary of Navy.

FUTURE OF U.S.-MEXICAN RELATIONS

The U.S. relationship with Mexico has steadily improved over the last couple of decades. A relationship once marked by distrust has thawed into a partnership based on trade, law enforcement, and counternarcotics, and that is what is really at stake here, with heated rhetoric threatening to upend that.

Throughout the campaign, Trump used Mexico as a punching bag, saying while he loved the Mexican people, even appreciated their leaders’ intelligence, he blamed the country for taking American jobs and for a flow of crime and drugs across the border.

Since he was sworn in, things have unraveled further -- the canceled presidential visit, arguments over the wall and deportations and that tense phone call. The administration, however, sees things as on track.

“We have some differences on specific issues,” acknowledged a senior administration official, but “we continue to look for ways to address the concerns of both countries, produce results for both peoples, and we’re confident that through this process we’ll continue the long and good relationship that we’ve had between the two governments.”

On the other side of the border, though, Mexico may see deeper damage, and it could use these high-profile meetings to make that clear. Perhaps previewing such a move, the Mexican foreign minister even threatened Wednesday to involve international organizations to defend the Mexican people.

“The Mexican government will not hesitate to go to multilateral organizations starting with the United Nations to defend, in accordance with international law, human rights, liberties and due process in favor of Mexicans” abroad, Videgaray said Wednesday.

Thursday’s meetings will determine if such a bold move is necessary.