Updated

In a special ceremony at the White House on Monday, President Donald Trump honored two agencies - Immigration and Customs Enforcement and Customs and Border Protection - calling their members “incredibly brave patriots who keep America safe.”

The “Salute to the Heroes" event took place with the two agencies at the center of a national debate over how to handle the influx of families and unaccompanied children at the U.S.-Mexican border.

“American is a land of opportunities because we are a nation of laws,” Trump said, “For America to be a strong nation, we must have strong borders.”

Trump took aim at opponents --including Democratic leaders and immigration advocacy groups -- of tougher border enforcement. He portrayed them as not grounded in the reality that control of immigration at the borders and the interior is critical to law and order, and security.

Trump called them “open border exrtremists” who "have no courage, they have no guts, they just have big loud mouths.”

You are the patriots and you are the heroes. You keep us safe and you keep us free. I’m honored every single day to serve as your Commander-in-Chief. I will never leave your side, I will never leave the fight.

— President Donald Trump, to Immigration and Customs Enforcement and Customs and Border Protection

Trump highlighted important achievements that agents of both ICE and CBP had accomplished, including rescuing 78 smuggled immigrants found inside a locked refrigerated tractor trailor at a border checkpoint earlier this month, arresting more than 100,000 criminals, refusing entry to roughly 10 known or suspected terrorists each day; and in a single operation, arresting more than 300 members of the brutal MS-13 gang.

“You are the patriots and you are the heroes,” he said to the roomful of agents. “You keep us safe and you keep us free. I’m honored every single day to serve as your Commander-in-Chief. I will never leave your side, I will never leave the fight.”

“Thank you for your service,” he said. “You are truly incredible people.”

The president also blamed Democrats for making it difficult to change policies and laws that create sanctuary cities and discourage local officials, including police, from working with ICE. But he expressed confidence stricter measures would be passed and implemented.

In addition to representatives from ICE and CBP, members of the National Sheriffs’ Association attended the event.

2a934df7-

Bristol County (Mass.) Sheriff Thomas Hodgson (Bristol County Sheriff's Office)

A law enforcement official who attended told Fox News he wanted to show his support and gratitude to ICE and CBP, saying they help keep his community in Massachusetts safer.

“ICE plays a critical value in our communities, working in concert with us and making sure people arrested by local police don’t get released back into the local communities, putting our citizens at risk and law enforcement at risk, trying to track them down,” said Bristol County (Mass.) Sheriff Thomas Hodgson.

“There are thousands of people in our prison are in there under false identities, there are gangs,” Hodgson said. “ICE helps us identify people we don’t know are wanted by them, who may have come back (illegally) into the country several times, and who we don’t know are a danger to the communities.”

The White House event comes after Trump has repeatedly defended and singled out ICE, in particular, for enforcing immigration laws.

ICE and CBP have come under fire by critics this year after a “zero tolerance” policy was implemented in response to a surge at the border that resulted in the separation of children from their parents.

U.S. District Judge Dana Sabraw in June ordered that children under five be rejoined with their parents within 14 days, and children five and older be reunited within 30 days.

The order came days after Trump halted the zero-tolerance policy. As of Aug. 16, the government had reunified 2,089 children with their parents or to others, including sponsors. Nearly 600 children were still separated, including 366 with parents outside the U.S.

“Only this White House would give medals for taking thousands of immigrant children from their parents," said Tom Jawetz, vice president for immigration policy at the left-leaning Center for American Progress, to Politico, "and continuing to detain hundreds of orphaned kids in defiance of a court order.”

Some Democrats have called for abolishing ICE altogether, while others have criticized that move, saying it will hurt them in the mid-term elections by giving ammunition to those who say they want open borders.

Defenders of ICE and CBP say they merely are doing their jobs, and that frustration should be aimed at Congress for failing to overhaul immigration laws.

"This is a big event, even for law enforcement because the president has been so supportive," said Hodgson. "He's been very outspoken about law enforcement, and for the ICE agents and Border Patrol agents who've been attacked, it's a big morale-booster that we have a Commander-in-Chief who is standing behind us."

At a Cabinet meeting recently, Trump praised ICE and others who enforce immigration laws.

"They are tremendous people,” he said, according to published reports. “They're brave. They're strong. They're tough. And they're good. They're good people. And you think you're going to send just regular people in to take care of MS-13 and these gangs? Not going to happen. So I just want to thank ICE and everybody in law enforcement for the incredible job they've done and are doing.”

Last month Trump tweeted: “Every day, the brave men and women of ICE are liberating communities from savage gangs like MS-13. We will NOT stand for these vile Democrat smears in law enforcement. We will always stand proudly with the BRAVE HEROES of ICE and BORDER PATROL!”

The Associated Press contributed to this report.