“Our country looks bad to the world, especially when we are supposed to be the world’s leader — how can we lead when we can’t even control our own cities?” Mr. Trump said. “We honor and recognize the right for all Americans to peacefully assemble and protest and demonstrate. But there is no right to engage in violent disruption or to threaten the public safety and peace of others.”

Earlier, in an interview on “Fox & Friends,” Mr. Trump addressed his call on Wednesday to broaden the use of stop-and-frisk policing to other cities across the nation. Asked about the policy, which is loathed by many African-Americans and whose legality has been questioned, Mr. Trump said he was specifically referring to the use of increased stop-and-frisk in Chicago — a city that has been besieged by crime and gun violence.

But he also asserted his general support for the policy — ”They’ll stop, they’ll frisk, and they’ll take the gun away, and they won’t have anything to shoot with,” Mr. Trump said on Fox — and he reiterated that support during his speech here on Thursday.

“Look at the example we had in New York of Mayor Rudy Giuliani,” Mr. Trump said, saying that the stop-and-frisk policies, which were instituted during Mr. Giuliani’s tenure as mayor, had helped curb murder and other crimes in the city. “Think of how many families these policies saved from the worst heartache imaginable.”

But Mr. Trump, whose support among African-American voters is still in the single digits in most polls, also tried to strike a more inclusive, conciliatory note, speaking of the “law-abiding African-American residents who live in these communities” and “suffer the most as a result of these riots.” He called for more law enforcement, more community engagement and “more effective policing.”

“Our job is not to make life more comfortable for the violent disrupter, but to make life more comfortable for the African-American parent trying to raise their kids in peace, to walk their children to school and to get their children great educations,” he said. “For every one violent protester, there are thousands of moms and dads and kids in that same community who just want to be able to sleep — really to sleep safely at night. To be able to walk on the streets. To be able to go to the grocery store.”

Later, Mr. Trump stopped by Geno’s, the famous Philadelphia cheesesteak place, to sample the city’s signature sandwich.