Guardian UK–  Barack Obama has told young people of colour “your lives matter” in public remarks that supporters welcomed as an antidote to Donald Trump’s racially charged and divisive threats to crack down on civil dissent.

America’s first black president on Wednesday expressed faith in young people in the US and said he remained “optimistic” about the future despite the police killing of George Floyd and mounting crises that Trump’s critics say leave the country crying out for leadership.

Obama spoke at an event by the My Brother’s Keeper alliance, a program of the Obama Foundation, that was called “Reimagining Policing in the Wake of Continued Police Violence.” It was the first public appearance by the 44th president since Floyd was killed by a white Minneapolis police officer kneeling on his neck, sparking nine days of nationwide protests that have been mostly peaceful.

In striking contrast to the White House incumbent, whose expressions of sympathy for Floyd have been overshadowed by harsh warnings that the US military could be deployed to impose law and order, Obama at one point spoke directly to young men and women of color.

“I want you to know that you matter, I want you to know that your lives matter, that your dreams matter, and when I go home and I look at the faces of my daughters, Sasha and Malia, and I look at my nephews and nieces, I see limitless potential that deserves to flourish and thrive,” Obama said in a virtual town hall for My Brother’s Keeper.

“And you should be able to learn and make mistakes and live a life of joy without having to worry about what’s going to happen when you walk to the store, or go for a jog, or are driving down the street, or looking at some bird in a park.”

He added: “So I hope that you also feel hopeful even as you may feel angry because you have the potential to make things better and you have helped to make the entire country feel as if this is something that’s gotta change. You’ve communicated a sense of urgency that is as powerful and as transformative as anything that I’ve seen in recent years.”

Obama then paid tribute to police officers who have shown solidarity with demonstrators. “I want to acknowledge the folks in law enforcement that share the goals of reimagining policing.”

But he also urged police reforms, including a ban on shooting at moving vehicles and on some forms of restraint used by the police. “Chokeholds and strangleholds, that’s not what we do,” he said. “I’m urging every mayor in this country to review your use-of-force policies with members of your community and to commit to reforms.”

Trump’s strongman response, which contrasts with his support for armed white demonstrations against pandemic lockdowns in Michigan and elsewhere, has drawn fierce condemnation from Obama’s former vice-president, Joe Biden, and other Democrats.

But not for the first time, Obama, whose wife, Michelle, once famously pledged “When they go low, we go high”, swerved past a direct engagement with Trump’s actions and instead offered an alternative vision of the future. His criticisms of the president were implicit in certain silences and certain themes.