President Trump on Friday said he has struck a deal that would designate Guatemala as a safe third country for people seeking asylum in the United States — a plan that is facing significant legal hurdles in the Central American country as the Trump administration continues to struggle with the high number of migrants arriving at the southern U.S. border. 

The White House did not immediately release details of the agreement, and it is unclear how it would be implemented considering Guatemala’s constitutional court has ruled any safe third country agreement would require legislative approval and the proposal has been widely criticized there. 

Trump announced the arrangement in a previously unscheduled appearance in the Oval Office with Enrique Degenhart, the Guatemalan minister of government, and acting homeland security secretary Kevin McAleenan. 

“We’ve long been working with Guatemala, and now we can do it the right way,” Trump said Friday. He claimed the agreement will put “coyotes and the smugglers out of business.”

He added: “These are bad people.” 

Trump said the agreement will offer safe harbor for asylum applicants deemed legitimate, and that he plans to sign agreements with other countries soon. 

The announcement comes just days after Trump threatened retaliation against Guatemala as discussions stalled over designating the Central American nation as a safe third country, which means migrants traveling through the country on their journey to the United States would be directed to first seek protection there.

The Trump administration has been seeking to sign these agreements to cut down on the number of Central American migrants arriving at the U.S.-Mexico border, which officials say is overwhelming the U.S. immigration system. The administration has come under heavy criticism from Democrats and immigration advocates who argue asylum seekers and other migrants face inhumane conditions in the U.S. facilities where they are being housed.

On a call with reporters Friday, McAleenan said the agreement with Guatemala would “be up and running in August,” after the two governments had completed several steps to ratify the deal. Under the agreement, Salvadorans and Hondurans would need to seek asylum in Guatemala, McAleenan said.

“If you have, say, a Honduran family coming across through Guatemala to the U.S. border, we want them to feel safe to make an asylum claim at the earliest possible point,” he said. “If they do instead, in the hands of smugglers, make the journey all the way to the U.S. border, [they would] be removable back to Guatemala.”

Guatemala’s only public statement about the agreement did not explicitly say it would serve as a safe third country, but alluded vaguely to “a plan that will be applied to Salvadorans and Hondurans.”

The statement said the United States would allocate temporary agricultural work visas to Guatemalans, adding that country’s president, Jimmy Morales, negotiated the deal “to counter grave economic and social repercussions.” 

A proposal to designate Guatemala as a safe third country is already facing significant legal and logistical challenges. For one, the deal would force thousands of Hondurans and Salvadorans to apply for asylum in Guatemala, one of the region’s poorest countries, which has in some cities struggled to defeat transnational gangs, including MS-13.

 Last year, Guatemala received 259 asylum applications, a tiny number compared with the United States and even Mexico. Of those, not a single application was approved, in part because the country is still building institutions to review those cases. 

“Guatemala’s asylum system isn’t prepared to increase its capacity to 50,000 in less than a year,” said one United Nations official, who spoke on the condition of anonymity because they weren’t authorized to speak publicly.

The United Nations High Commissioner for Refugees, which currently supports Guatemala’s fledgling asylum system, was not consulted as part of the negotiations, officials said. McAleenan also likened the third party agreement to arrangements between European countries and Turkey to stem the Syrian migrant crisis in 2015. He declined to say whether the U.S. government would be providing any assistance to Guatemala to improve safety and security for Honduran and Salvadoran refugees.  

When read the State Department’s description of the security situation in Guatemala, which includes notations that murder is “common,” gang activity is “widespread” and police are ineffective, McAleenan, the Homeland secretary, said one should not “label an entire country as unsafe,” and likened Guatemala to parts of the United States.

The announcement prompted immediate backlash from Democratic lawmakers and human-rights groups who warned that Guatemala did not have the capacity to accept all the migrants who would now be required to apply for asylum there, nor is such an arrangement legal.

Sen. Tim Kaine (D-Va.), who along with Sen. Mazie Hirono (D-Hawaii) toured Border Patrol facilities in El Paso on Friday, noted that Guatemala has one of the world’s highest homicide rates and that they had visited with families earlier in the day who said they had fled the country because of the danger.

“It’s just Kafkaesque to say about that country, ‘Oh, safe third country,’ ” Kaine said. “You can’t just attach a label of safe third country and make it so.”

The Trump administration has taken a variety of unilateral actions to address the challenges at the border, and it has also received an additional $4.6 billion from Congress to deal with the crisis. 

In June, Customs and Border Protection apprehended 94,000 migrants at the southern border, a 29 percent drop from the 133,000 who were detained in May. Border crossings tend to drop as the temperature rises in the summer, but administration officials have pointed to the lower figures as a sign that Trump’s border plan is working. 

For months, Morales dispatched members of his administration from Guatemala to Washington to negotiate a safe third country agreement with the United States. But earlier this month, shortly before Morales was scheduled to sign the agreement in the White House, Guatemala’s constitutional court ruled he did not have the authority to sign the deal without legislative approval.

The meeting with Trump was canceled. In a statement, Morales then denied he had ever attempted to negotiate such an agreement. He is in the twilight of his scandal-ridden presidency, with elections scheduled for Aug. 11.

But when Trump threatened to impose tariffs on Guatemala and tax remittances, Morales resumed negotiations. Members of the country’s business community urged him on, raising alarm about the impact of tariffs, but most Guatemalans believe the country is wildly unprepared to offer asylum to thousands of Central Americans.

A number of Guatemalan congressmen and human rights officials said they would soon challenge the legality of Friday’s agreement in the country’s courts.

Jordán Rodas, Guatemala’s human rights prosecutor, said the country’s interior minister, who signed the deal on Friday, “does not have the power to sign an agreement of this nature.”

He said he was analyzing the agreement, and if he determined it was illegal, he would demand the constitutional court suspend its implementation.

“We are two weeks from an election,” said Edgar Gutierrez, one of five Guatemalan ex-foreign ministers who had earlier filed a petition in the court to block the signing of the agreement. “The signing of this accord will destabilize the country.”

Some Guatemalan analysts said the timeline for the agreement made it even more unrealistic.

“One month to be a safe country,” said Pedro Pablo Solares, a leading Guatemalan columnist who frequently writes about migration. “It couldn’t be more absurd.”

This year, for the first time in history, more Guatemalans have been apprehended at the U.S. border than citizens of any other country. It remains one of the region’s poorest countries, where migration is seen by many as the only way into a tiny middle class. In 2017, Guatemalans received a total of $8.2 billion in remittances, 11 percent of Guatemalan GDP. 

Guatemalan politicians and analysts were taken aback by the agreement, which most discovered through a White House tweet. 

“One characteristic of this government is that it does whatever it wants, in spite of what the law says. This is another example,” said Sandra Morán Reyes, a congresswoman from the Convergencia party.

Sieff reported from Mexico City. Mary Beth Sheridan in Mexico City and Bob Moore in El Paso contributed to this report.