MEXICO CITY (AP) — Seeking to tamp down growing unease in Latin America, U.S. Homeland Security Secretary John Kelly pledged Thursday that the United States won't enlist its military to enforce immigration laws and that there will be "no mass deportations."

Only hours earlier, President Donald Trump suggested the opposite. He told CEOs at the White House the deportation push was a "military operation."

Kelly, speaking in Mexico's capital, said all deportations will comply with human rights requirements and the U.S. legal system, including its multiple appeals for those facing deportation. He said the U.S. approach will involve "close coordination" with Mexico's government.

"There will be no use of military forces in immigration," Kelly said. "There will be no — repeat, no — mass deportations."

Yet while Kelly and U.S. Secretary of State Rex Tillerson tried to alleviate Mexico's concerns, Trump was fanning them further, with tough talk about "getting really bad dudes out of this country at a rate nobody has ever seen before."

"It's a military operation," Trump said Thursday while his envoys were in Mexico City. "Because what has been allowed to come into our country, when you see gang violence that you've read about like never before and all of the things, much of that is people who are here illegally."

It was an altogether different message from Kelly and Tillerson, who traveled here to meet with top Mexican officials at a time of intense turbulence for U.S.-Mexico relations. Indeed, Trump acknowledged he had sent his top diplomat south of the border on a "tough trip."

In contrast to Trump, Tillerson and Kelly emphasized a U.S. commitment to work closely with Mexico on border security, illegal immigration and trafficking of drugs and weapons — issues Trump has made a central focus of his young presidency, much to Mexico's dismay. Both Tillerson and Kelly appeared to downplay any major rift between the U.S. and Mexico.

"In a relationship filled with vibrant colors, two strong sovereign countries from time to time will have differences," Tillerson said. "We listened closely and carefully to each other as we respectfully and patiently raised our respective concerns."

Story continues

For Mexico, that patience was running short.

Foreign Relations Secretary Luis Videgaray noted the "public and notorious differences" between the countries and said the Mexicans had raised the "legal impossibility" of a government making "unilateral" decisions affecting another country. Videgaray has previously raised the prospect Mexico could seek recourse at the United Nations or elsewhere for U.S. moves violating international law.

"It is an evident fact that Mexicans feel concern and irritation over what are perceived as policies that may hurt Mexicans and the national interest of Mexicans here and abroad," Videgaray said.

The divergent tones from Trump and from his Cabinet officials left Mexico with an uncomfortable decision about whom to believe. Throughout Trump's first weeks, foreign leaders have grown increasingly skeptical as Trump's envoys deliver soothing messages that are then negated by the president.

Mexico has been incensed that the U.S. announced — without Mexico's sign-off — that people caught crossing the border illegally will be sent back to Mexico — even those from third countries who have no connection to Mexico. Interior Secretary Miguel Angel Osorio Chong, Kelly's Mexican counterpart, said that concern had come up Thursday, too.

Both countries said it was positive that the neighbors remained committed to working through the disputes diplomatically, though there were no indications they were any closer to a resolution. As the Americans wrapped up their Mexico visit, they remained at odds with their hosts over the deportations and over the massive border wall Trump has vowed to construct at Mexico's expense.

Trump spoke during the presidential campaign about using a "deportation force." His Homeland Security Department at one point considered using the National Guard to help with deportations, although the White House has said that idea has been ruled out.

The Homeland Security Department didn't immediately respond to requests to clarify why Trump's remark about "a military operation" had conflicted with that of Kelly, who blamed the media for "misreporting." At the White House, spokesman Sean Spicer said Trump hadn't been speaking literally. He said Trump used the "military operation" phrase "as an adjective" to describe the precision with which immigration enforcement was being carried out.

Tillerson and Kelly also met behind closed doors with Mexican President Enrique Pena Nieto before returning to Washington. Pena Nieto's office said he told the visitors that Mexico's top priorities are "the protection of Mexicans in the United States and respect for their rights." The U.S. declined to release any details about what was discussed in the meeting.

Pena Nieto recently canceled a trip to Washington over Trump's insistence that Mexico pay for the wall. It has not been rescheduled.

In addition to sending border-crossers from third countries into Mexico, new memos signed by Kelly this week call for prioritizing deportation for anyone charged or convicted of any crime, rather than just serious crimes. That potentially subjects millions in the U.S. illegally to deportation, many Mexicans included.

Those policies have stoked fears in Mexico about the possibility of deportee and refugee camps emerging along Mexico's northern border. Mexican officials were also apprehensive that a forthcoming report ordered by Trump's administration listing all current U.S. aid to Mexico is intended to threaten Mexico into compliance over immigration or the wall.

Mexico has also raised concerns about Trump's pledge to overhaul the trade relationship and possibly apply steep taxes to Mexican products, a move with profound impacts for Mexico's export-heavy economy. Tillerson said the leaders had agreed the trade relationship needed to be modernized and strengthened.

___

Associated Press writer Mark Stevenson in Mexico City and Jonathan Lemire in New York contributed to this report.

___

Reach Josh Lederman on Twitter at http://twitter.com/joshledermanAP