Philadelphia Mayor Jim Kenney (D) lashed out against President Trump on Wednesday following the administration's decision to cancel a key immigration program for nearly 60,000 Haitians.

Speaking to a group of advocates and city residents in support of refugees and immigrants, Kenney apparently went off script near the end of his remarks.

"I'm just beside myself with sadness because our president is a bully, our president is a punk, and he just doesn't get it. I don't know where he was raised but his family didn't do a good job raising that guy," Kenney said, according to a local NBC affiliate.

Prior to his critique of Trump, Kenney was discussing Temporary Protected Status (TPS), a program that gives residency and work permits to around 300,000 foreign nationals from countries that have undergone major disasters.

On Monday, Acting Homeland Security Secretary Elaine Duke announced she was canceling TPS for the nearly 60,000 Haitians who've been in the program since a 2010 earthquake ravaged their country.

Duke gave the Haitians 18 months to either secure a different immigration status -- a long-shot for most TPS holders -- or return to their home country.

The move came weeks after Duke cancelled TPS for around 5,000 Nicaraguans in the country, while letting the status of some 57,000 Hondurans automatically renew for six months.

The Trump administration has pursued a strict interpretation of the TPS statute, unlike previous Democratic and Republican administrations.

The Trump administration has focused on the temporary nature of the program and the idea that country designations should be terminated dependent on country conditions directly related to the disaster that prompted them, not country conditions in general.

In May, then-DHS Secretary John Kelly - who has since become White House chief of staff - extended TPS for Haiti for six months, pointing to the rebuilt presidential palace as a sign that the earthquake's challenges had been overcome, despite the fact that Haiti remains the poorest country in the hemisphere and had recently suffered a cholera epidemic.

Earlier this year at DHS, Kelly also ended the TPS designation that protected just over 1,000 Sudanese citizens.

That change in interpretation has brought on criticism from Republicans and Democrats alike, who say it's cruel to send TPS holders back to potentially dangerous countries.

Lawmakers have also argued that some TPS beneficiaries have been in the United States so long they should be allowed to permanently stay here.

Adding his voice to the critics of the administration on TPS, Kenney brought up the unresolved issue of what to do with American citizen children of deported parents.

"It's bad policy to take away these protections without any thought or plan in place for the U.S. born children who may now lose their Sudanese, Haitian or Nicaraguan parents and caregivers to deportation," Kenney said Wednesday.

"Can you imagine if they ended TPS for the Irish?" he added.

Kenney also spoke out in support of recipients of the Deferred Action for Childhood Arrivals (DACA) program. Trump moved to rescind that Obama-era program in September, setting off a legislative battle to replace it with permanent protections for nearly 690,000 undocumented immigrants who came to the country as children.

Kenney said Trump's actions on immigration are having a broader effect on the country.

"This country used to be a country of compassion and empathy. It is now a country of anger and divisiveness, and Donald Trump is the reason why we've gotten where we are," he said.

"Let's stick together and help each other out regardless of what happens in Washington, so happy Thanksgiving," Kenney added.