LOS ANGELES — President Obama on Thursday said that whoever shot at police officers in Ferguson, Mo., this week were “criminals” and should be arrested, but added that their actions should not detract from the civil rights issues that have been raised.

He said that protesters there had a legitimate right to be angry about their treatment at the hands of the police.

“What had been happening in Ferguson was oppressive and objectionable and was worthy of protest,” Mr. Obama said during an appearance on ABC’s “Jimmy Kimmel Live.” “But there was no excuse for criminal acts.”

Mr. Obama cited the recent Justice Department report on Ferguson, which he said found a “whole structure” that indicated “both racism and just a disregard for what law enforcement is supposed to do.” But he repeated his belief that what happened in the Missouri city was “not unique, but it’s also not the norm.”