Former US president Barack Obama has called on fellow Democrats to reject the politics of “division” and “fear”.

Stepping into the political spotlight for the first time since leaving the White House in January, Mr Obama did not mention President Donald Trump in two campaign speeches, but he did tell crowds that they could send a message to the rest of the country in forthcoming elections.

He told a rally in Virginia in front of several thousand supporters: “Why are we deliberately trying to misunderstand each other, and be cruel to each other and put each other down? That’s not who we are.”

Mr Obama, who was campaigning with the party’s gubernatorial candidates in Virginia and New Jersey, added: “Our democracy’s at stake, and it’s at stake right here in Virginia.”

Mr Obama’s remarks came on the same day as former president George W Bush denounced bigotry in Trump-era American politics, warning that the rise of “nativism”, isolationism and conspiracy theories have clouded the nation’s true identity.

Barack ObamaBarack Obama listens to the crowd during a rally in Virginia (Steve Helber/AP)

The comments, delivered at a New York City conference hosted by the George W Bush Institute, amounted to an indirect critique from a former Republican president who has remained largely silent during Mr Trump’s unlikely rise to power.

Like Mr Obama, Mr Bush did not name Mr Trump, but he attacked some of the principles that define the 45th president’s political brand.

Mr Bush said: “We’ve seen nationalism distorted into nativism, forgotten the dynamism that immigration has always brought to America.”

He added: “We’ve seen our discourse degraded by casual cruelty. Bigotry seems emboldened. Our politics seems more vulnerable to conspiracy theories and outright fabrication.

“We need to recall and recover our own identity. To renew our country, we only need to remember our values.”

Virginia and New Jersey are the only two states electing new governors this year and those November races will be considered a bellwether of Democrats’ strength in the face of Mr Trump’s victory last year.

Mr Obama said: “Some of the politics we see now we thought we put that to bed. That’s folks looking 50 years back. It’s the 21st century, not the 19th century.”

The first black president offered himself as proof that the country could move forward, telling the crowd in Richmond, the former Capitol of the Confederacy, that he is a distant relative of Confederate president Jefferson Davis on his mother’s side.

“Think about that,” Mr Obama said. “I’ll bet he’s spinning in his grave.”