Barack Obama returned to the campaign trail on Thursday, railing against the "politics of division" after keeping a low profile and avoiding direct confrontation with his White House successor since leaving office.
Speaking at a rally in New Jersey to support the Democratic Party candidate for governor, the 56-year-old former president took aim at the fear and bitterness that marked the 2016 campaign which led to Donald Trump's presidency.
"What we can't have is the same old politics of division that we have seen so many times before, that dates back centuries," Obama said at the event in Newark for Phil Murphy.
"Some of the politics we see now, we thought we put that to bed. That's folks looking 50 years back," Obama added. "It's the 21st century, not the 19th century."
Obama later appeared at an event in Richmond to support Ralph Northam, his party's gubernatorial candidate in Virginia, at which he obliquely criticized the way Trump gained the White House.
"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," Obama said.
"We are at our best not when we are trying to put people down, but when we are trying to lift everybody up," he said.
Voters in both New Jersey and Virginia will decide the contests on November 7, one year after Trump defeated Democrat Hillary Clinton and stormed into the White House on a wave of anti-establishment fury.
The races are potential indicators of voter sentiment ahead of the 2018 midterm elections, which will be a major test for Trump and his Republican Party.
University of Virginia political science professor Larry Sabato said the New Jersey and Virginia governor races are the only "big elections" for 2017.
"What's at stake is bragging rights headed into the 2018 midterm elections," Sabato told AFP.
Obama has remained largely detached from the political debate since leaving office on January 20, in keeping with presidential tradition.
Trump has meanwhile used his first nine months in the White House to methodically demolish key Obama administration policies.
After three months of vacation Obama began writing his memoirs. He has said little in public and granted almost no interviews.
The few times Obama broke his silence was to comment on issues of national importance, such as immigration, health care and climate change.
In New Jersey, Murphy is the clear frontrunner to succeed Republican Governor Chris Christie, a Trump ally whose popularity has plummeted to record lows.
New Jersey "is a runaway win for the Democrats, so Virginia is the only competitive contest. Obama is needed much more in Richmond than Trenton," said Sabato, referring to the capitals of the two states.
Virginia is a pivotal state and the only southern US state that Clinton won in 2016. Its importance is amplified by its proximity to the capital Washington.
"If the GOP loses in Virginia, Trump will be widely blamed since he is so unpopular in a state carried by Hillary Clinton," Sabato said.
Should Republicans win Virginia's governorship, "then Trump will not be viewed as such a liability for the GOP in 2018."
In Richmond, Obama backed Northam, the state's lieutenant governor who was credited Wednesday with a slight lead over Republican Ed Gillespie in a Quinnipiac poll.
More than six hours ahead of the event in Richmond, student Lucas Anderton was in the queue for tickets.
"It's important for me, he's my hero and so it's nice to see him out in the battle again," Anderton said.
"I am hoping that he does something to speak to the African-American population, I really do, because we are in need of a strong leader," said Nancy Atkins, who was waiting to enter the venue ahead of Obama's Richmond speech.
"We need a Martin Luther King to step up, and I can see the former president Obama as being that leader," Atkins said.
Well aware of the vote's importance, Trump has backed Gillespie and accused Northam of "fighting for the violent MS-13" Hispanic gang, as well as "sanctuary cities" that offer shelter to illegal immigrants.
Gillespie, a former advisor to president George W. Bush who has become a millionaire lobbyist, has so far kept cautious distance from the mercurial Trump, whose backing recently failed to ensure the election of his pick in a Republican Senate race in Alabama.