Back in the public fray at a rally in Virginia, the former president delivered his views on the current political climate in his strongest terms yet

It was the night his supporters waited nine long months for. Barack Obama returned to the fray on Thursday with a fervent denunciation of Donald Trump in all but name, condemning the politics of division and rekindling the politics of hope.

The former US president earned deafening cheers at a rally ostensibly for the Democratic candidate in a gubernatorial election in Virginia. In championing Ralph Northam’s cause, Obama expressed his views on the state of the nation in the strongest terms since the inauguration of his successor and antithesis.

“You’ll notice I haven’t been commenting a lot on politics lately,” Obama told thousands of supporters in Richmond. “But here’s one thing I know: if you have to win a campaign by dividing people, you’re not going to be able to govern them. You won’t be able to unite them later if that’s how you start.”

Campaigning for fellow Democrat Hillary Clinton last year, Obama hammered Trump regularly during the presidential election but became more circumspect after the Republican’s shock win. He initially expressed a wish to follow the example of George W Bush, who refrained from commentary once he left the White House. He has also trodden carefully to avoid outshining the next generation of would-be Democratic stars.

George W Bush condemns bigotry and lies in coded attack on Trump Read more

Nevertheless, he has taken Trump to task in written statements for efforts to gut his signature healthcare law and reverse his immigration and environmental policies. He has also offered spare, pointed criticisms during public appearances. But on Thursday he returned to full campaign mode in New Jersey and Virginia, both of which elect governors on 7 November.

While not mentioning Trump by name, Obama delivered a withering critique of the president’s time in office. His polished style and elegant, erudite sentences contrasted with the bellicose, scattergun approach of his successor, as did the racial diversity of the crowd who queued for hours to see him.

Facebook Twitter Pinterest Obama addressed a crowd at an earlier rally in Newark, New Jersey, on Thursday. Photograph: Spencer Platt/Getty Images

“Instead of our politics reflecting our values, we’ve got politics infecting our communities,” said Obama, looking relaxed in a tieless blue shirt and suit. “Instead of looking for ways to work together to get things done in a practical way, we’ve got folks who are deliberately trying to make folks angry, to demonise people who have different ideas, to get the base all riled up because it provides a short-term tactical advantage.”

He continued: “The question now, at a time when our politics seem so divided and so angry and so nasty, is whether we can recapture that spirit, whether we support and embrace somebody who wants to bring people together,” Obama said. “Yes, we can.”

The crowd erupted in chants of the winning 2008 slogan, “Yes, we can!”

Virginia became a battleground this summer when white supremacists marched in Charlottesville and a civil rights activist was killed. Trump notoriously said there was blame “on both sides” and deflected attention to whether Confederate statues should be torn down, and whether that would lead to slave owners George Washington and Thomas Jefferson being toppled too.

The first black president said: “If we’re going to talk about our history then we should do it in a way that heals, not in a way that wounds, not in a way that divides. We shouldn’t use the most painful parts of our history just to score political points. We saw what happened in Charlottesville but we also saw what happened after Charlottesville when the biggest gatherings of all rejected fear and rejected hate and the decency and goodwill of the American people came out.

“That’s how we rise. We don’t rise up by repeating the past. We rise up by learning from the past and listening to each other.”

We should have seen Trump coming | Ta-Nehisi Coates Read more

His voice growing with emotion matched by the crowd, Obama continued: “We can acknowledge that Thomas Jefferson, one of Virginia’s most famous sons, owned and sold slaves – that’s not disputable. And we can also acknowledge that he also wrote those words: ‘We hold these truths to be self-evident: that all men are created equal; that they are endowed by their Creator with certain unalienable rights; that among these are life and liberty and the pursuit of happiness.’

“And we can recognize that even if our past is not perfect we can honor the constitutional ideals that have allowed us to come this far and to keep moving toward a more perfect union. That’s what America is. That’s who we are.”

For those gathered in the Greater Richmond Convention Center there was excitement and some wistfulness. Amber Wihshi, a 21-year-old African American woman, said: “I’m a little nostalgic. I remember being in eighth grade when Obama was inaugurated. But seeing so many people here shows there are still people fighting for change who don’t want to see America go backwards.”

Facebook Twitter Pinterest Barack Obama and Ralph Northam in Richmond, Virginia. Photograph: Jonathan Ernst/Reuters

In an NBC News/Wall Street Journal poll in August, 51% of Americans said they have a favourable opinion of Obama, while 35% had a negative opinion. The same survey found that 36% said they had a positive opinion of Trump and 52% had a negative opinion. The pair are not thought to have spoken to each other since Trump’s inauguration.

Wihshi added: “He’s still our president. You can’t compare the two. The way they handle everything is so different. Barack Obama is the people’s president; Donald Trump encourages hate and tried to divide groups.”

Trump: 'Ask General Kelly' if Obama called after son died in Afghanistan Read more

Michael Steele, former chairman of the Republican National Committee, sat at the table next to Trump’s at the 2011 White House correspondents dinner, where Obama gave the billionaire businessman a roasting. “I remember him not enjoying one bit of it,” he said by phone on Thursday. “There is no doubt in my mind that the president has had a fixation on President Obama since then.”

Indeed, Trump, who was a longtime proponent of a false conspiracy theory that Obama was not born in the US, appears to be obsessed with assailing the legacy of his predecessor. He pulled the US out of the Trans Pacific Partnership, announced his intention to quit the Paris climate agreement and has threatened to walk away from the Iran nuclear deal – all products of the Obama administration. He has also tried to torpedo the Affordable Care Act, known as Obamacare, turning to executive orders after deadlock in the Republican-controlled Congress.

And this week Trump made one of his most personal attacks yet, claiming that his predecessor did not regularly call families of military service personnel killed in combat – a charge that provoked a furious backlash from former administration officials.

Asked to compare the 44th and 45th presidents, Steele said: “Obama is more cerebral; Trump is more visceral and emotional. If Obama was upset by things he generally kept it to himself; with Trump, every little slight is played over and over on a 100ft screen. They are very different men in how they interact with people and how they deal with problems; Trump creates more problems than most presidents do.”