President Trump’s very good week ended with a surprise announcement on an agreement with Guatemala on asylum-seekers. Late Friday afternoon, President Trump summoned the White House press pool to the Oval Office. He, along with Enrique Degenhart, the Guatemalan minister of government, and acting homeland security secretary Kevin McAleenan announced that a deal has been reached for Guatemala to be a safe third country for migrants seeking asylum en route to the U.S. southern border.

The agreement offers a safe harbor in Guatemala for those who are determined to have legitimate asylum claims. Central Americans arriving in caravans at the U.S. southern border have overwhelmed the American system for those seeking asylum, most specifically Salvadorans and Hondurans. The new system should be in effect in August.

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.”

President Trump voiced support for such an agreement with Guatemala, as a previous attempt failed.

“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.”

This is a sensible move, especially in terms of trying to ease the burdens of overcrowding at the border. The Trump administration sees it as a way to shrink the number of migrants arriving and making asylum claims. It is a step in the right direction, especially given the non-stop complaints from President Trump’s opponents and social justice warriors about conditions at detention facilities. It just makes sense that migrants file a claim in the first country they come to once they are outside of their own.

Last week a deal fell through with Guatemala’s President Jimmy Morales. He was to sign it but the country’s Constitutional Court is on summer recess, therefore unable to issue approval of such an agreement. President Trump, unhappy about the delay, threatened to impose tariffs on Guatemala. And, just like that, there is now a deal. At least a tentative agreement, pending any legal challenges to the designation as a safe third country. If those traveling to the U.S. border don’t first apply for asylum in Guatemala, they will not be eligible for asylum in America. They will be sent back to Guatemala, though, not to their home country.

Kevin K. McAleenan, the acting secretary of homeland security, described the document signed by the two countries as a “safe third” agreement that would make migrants ineligible for protection in the United States if they had traveled through Guatemala and did not first apply for asylum there.

Instead of being returned home, however, the migrants would be sent back to Guatemala, which under the agreement would be designated as a safe place for them to live.

“They would be removable, back to Guatemala, if they want to seek an asylum claim,” said Mr. McAleenan, who likened the agreement to similar arrangements in Europe.

The Spanish text of the deal was released late Friday, calling it a “cooperative agreement regarding the examination of protection claims”, instead of “a safe third country”. This appears to be a decision made by President Morales to get around a court ruling that blocks him from signing such an agreement with the United States without the approval of his country’s congress. Morales leaves office in January and some running to replace him grumble that the next president should be the one making an agreement, not Morales.

Critics point to the dangerous conditions in Guatemala and say that the country can’t provide safe conditions or a fair system of protection for the migrants.

But critics said that the law clearly requires the “safe third” country to be a truly safe place where migrants will not be in danger. And it requires that the country have the ability to provide a “full and fair” system of protections that can accommodate asylum seekers who are sent there. Critics insisted that Guatemala meets neither requirement.

They also noted that the State Department’s own country condition reports on Guatemala warn about rampant gang activity and say that murder is common in the country, which has a police force that is often ineffective at best.

Asked whether Guatemala is a safe country for refugees, Mr. McAleenan said it was unfair to tar an entire country, noting that there are also places in the United States that are not safe.

It may not be perfect but the agreement is a start. Anything, at this point, to ease the burdens and chaos on our southern border is a win.