US President Donald Trump has used a conference of police chiefs to describe host city Chicago as “embarrassing” under the leadership of its top officer.

Mr Trump has frequently criticised Chicago for its crime problems and status as a sanctuary city, one of scores of cities around the country that refuse to work with federal authorities to round up people who are living in the US illegally.

Mr Trump said: “It’s embarrassing to us as a nation. All over the world they’re talking about Chicago. Afghanistan is a safe place by comparison.”

He also lashed out at Police Superintendent Eddie Johnson, who angered Chicago’s police by skipping Mr Trump’s first appearance in the city as president.

“More than anyone else he should be here, because maybe he could maybe learn something,” Mr Trump said, claiming Mr Johnson puts the needs of illegal immigrants above the needs of the law-abiding residents of Chicago.

“Those are his values and frankly those values to me are a disgrace,” Mr Trump said, vowing to never give priority to the needs of illegal immigrants. “I want Eddie Johnson to change his values and to change them fast.”

Mr Johnson’s decision to skip Mr Trump’s address angered the city’s chapter of the Fraternal Order of Police (FOP), which said in a Facebook post that “such a gesture would be an insult to both President Trump and the office of the presidency itself and would be a mark of disgrace upon the city throughout the entire nation, including Mayor Lori Lightfoot”. Ms Lightfoot has also refused to meet with Mr Trump while he is in her city.

Then FOP Lodge 7, which represents rank-and-file Chicago police officers, announced that it had cast a vote of no confidence in Mr Johnson.

The vote might please Mr Trump, who likes to tell officers not to treat crime suspects so gently and was cheered at last year’s gathering of the same police chiefs’ organisation in Orlando, Florida, when he advocated the use of the “stop and frisk” policing tactic that has been deemed unconstitutional.

The president’s visit also comes as more than 25,000 members of the Chicago Teachers Union have been on strike since October 17.

At the conference, Mr Trump signed an executive order creating a presidential commission on law enforcement to study issues like substance abuse, homelessness and mental illness, the White House said.

The order calls for establishing a framework for better training, recruiting and retaining law enforcement officers.

The president also announced that the Justice Department will begin a stronger crackdown on violent crime in the United States, targeting gang members and drug traffickers in high-crime areas.

“Let’s call it the surge,” Mr Trump said.

Mr Johnson, meanwhile, is under internal investigation after he was found sleeping in a city-owned vehicle earlier this month.

Ms Lightfoot said the superintendent, who called for the investigation, told her he had “a couple of drinks with dinner” before he fell asleep at a stop sign while driving home. Mr Johnson blamed the episode on a change in his blood pressure medication.

While in Chicago, Mr Trump is scheduled to headline a campaign luncheon that is set to raise approximately 4 million US dollars for a joint fundraising committee benefiting Mr Trump’s re-election effort and the Republican National Committee, according to the Republicans.

Mr Trump last visited Chicago in 2016 as a candidate for president for what was supposed to be a campaign rally on the campus of the University of Illinois at Chicago. But after fights broke out between supporters and protesters awaiting his arrival at the arena, Mr Trump cancelled the event before he took to the stage.

Mr Trump said then that he had consulted with Chicago police before making the decision. But the city’s top officer at the time, interim Superintendent John Escalante, disputed Mr Trump’s characterisation.