PORT-AU-PRINCE, Haiti — A top U.S. official on Friday apologized for how Haitian migrants were treated along the U.S.-Mexico border, saying it’s not how border officials or the Department of Homeland Security behave.

The comments from Juan Gonzalez, the U.S. National Security Council’s senior director for the Western Hemisphere, came during a two-day official visit to Haiti to talk with local leaders about migration and other issues.

"I want to say that it was an injustice, that it was wrong," he said. "The proud people of Haiti and any migrant deserve to be treated with dignity."

The U.S. government recently came under fire for its treatment of Haitian migrants, with images showing men on horseback, corralling Haitian asylum seekers.

TEXAS CITY'S RESOURCES STRAINED FOLLOWING DEL RIO MIGRANT SURGE

Gonzalez was visiting with Brian Nichols, U.S. assistant secretary for Western Hemisphere affairs, amid ongoing expulsions of Haitians from the U.S. to their homeland. Since Sept. 19, the U.S. has expelled some 4,600 Haitian migrants from Del Rio, Texas on 43 flights, according to the Department of Homeland Security.

U.S. Ambassador to Haiti Michele Sison, right, talks with National Security Council Senior Director for the Western Hemisphere Juan Sebastian Gonzalez, as Assistant Secretary for Western Hemisphere Affairs Brian Nichols speaks during a news conference at the U.S. Embassy, in Port-au-Prince, Haiti, Friday, Oct. 1, 2021.  (Associated Press)

Gonzalez said the gathering of migrants along the border is a public health emergency and warned those who are thinking of leaving not to risk their lives.

"The danger is too great," he said.

Gonzalez and Nichols previously met with Haitian Americans and Cuban Americans in Miami on Wednesday and with Haitian Prime Minister Ariel Henry, members of the civil society and political leaders in Haiti on Thursday to talk about migration, public safety, the pandemic and efforts to help those affected by the 7.2-magnitude earthquake that struck the country’s southern region in mid-August.

Nichols said that during their visit, they heard many people talk about the challenges that Haiti faces, noting that there’s a "surprising" amount of agreement on potential solutions.

"There is no solution that will work for Haiti and its people that will be imposed from the outside," he said, referring to recent criticism about the involvement of the U.S. and other countries in Haitian affairs as it tries to recover from the earthquake and from the July 7 assassination of President Jovenel Moïse at his private home. "However, we in the United States are committed to providing the Haitian people the support they need to succeed and implement their own vision."

Nichols said the conversation with the prime minister was constructive, adding that the U.S. is encouraging consensus and a holistic vision.

CLICK HERE TO GET THE FOX NEWS APP

"The future of Haiti depends on its own people," he said. "The United States is committed to working with the people of Haiti to support as they work to bring prosperity and security back to their country."

Nichols said a technical team from the U.S. State Department's Bureau of International Narcotics and Law Enforcement will visit next week as Haiti struggles with a spike in gang-related violence, with the bureau's assistant secretary visiting in upcoming weeks. He said later this month, the undersecretary for civilian security, democracy and human rights will visit with other senior officials to talk about police and security issues.

Associated Press writer Dánica Coto in San Juan, Puerto Rico contributed to this report.