RICHMOND, Va. (AP) — The Latest on former President Barack Obama campaigning for Democrats running for governor in New Jersey and Virginia (all times local):

9:10 p.m.

Former President Barack Obama is bemoaning the rise of racial politics.

Speaking at political rallies in New Jersey and Virginia, Obama said past prejudices the country thought it had "put to bed" have reemerged.

The first black president offered himself as proof that the country has moved forward, telling the crowd in Richmond, Virginia — the former Capitol of the Confederacy — that he is a distant relative to Confederate President Jefferson Davis on his mother's side.

"Think about that," Obama said. "I'll bet he's spinning in his grave."

Thursday was Obama's return to the political spotlight for the first time since leaving the White House in January. Virginia and New Jersey are the only two states electing new governors this year.

Former President Barack Obama on Thursday rallied at the side of his former ambassador to Germany, who is running for governor in New Jersey, and called on the crowd of Democrats to reject politics of "division" and "fear." (October 19)

___

8:10 p.m.

Former President Barack Obama is rallying supporters of Virginia's Democratic gubernatorial candidate and expressing frustration about the current state of political discourse.

Obama told Virginia voters Thursday evening to back Democrat Ralph Northam in next month's election, saying Northam wants to take the state forward and not backward.

He also decried the current state of politics and said "our democracy's at stake" in the Virginia election.

It was Obama's return to the political spotlight for the first time since leaving the White House in January. He also spoke earlier Thursday in New Jersey.

Virginia and New Jersey are the only two states electing new governors this year and those Nov. 7 races will be considered a bellwether of Democrats' strength in the face of President Donald Trump's victory last year.

___

7:15 p.m.

Virginia's Democratic governor says the Republican candidate for the state's highest office is treating President Donald Trump like he has a "communicable disease."

Gov. Terry McAuliffe's comments mocking Ed Gillespie's reluctance to campaign with Trump came as former President Barack Obama visited the state in support of Virginia Democrats ahead of next month's elections.

It's Obama's return to the political spotlight for the first time since leaving the White House in January. He also spoke at a rally in New Jersey.

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

___

4:25 p.m.

Former President Barack Obama is rallying supporters of New Jersey's Democratic gubernatorial candidate, who served as the U.S. ambassador to Germany during Obama's presidency.

Obama spoke to Phil Murphy's campaign volunteers on Thursday afternoon in Newark.

He walked onto stage and hugged Murphy as the crowd chanted, "Four more years!" Obama says he would refer those people "to the Constitution, as well as to Michelle Obama."

Murphy faces Republican Lt. Gov. Kim Guadagno on Nov. 7 in the race to replace Republican Gov. Chris Christie, who prohibited by term limit laws from running again.

On Thursday evening, Obama will head to Richmond, Virginia, to rally support for Democratic gubernatorial candidate Ralph Northam in his race against former Republican National Committee chairman Ed Gillespie. Democratic Gov. Terry McAuliffe is also term-limited.

___

2:30 p.m.

People were waiting in line for hours as former President Barack Obama returns to the campaign trail to stump for New Jersey's Democratic gubernatorial candidate.

Obama is dropping in Thursday afternoon on campaign workers in Newark, New Jersey, for a private "canvass kickoff" for Democrat Phil Murphy, who's running against Republican Lt. Gov. Kim Guadagno.

Seventy-year-old Jersey City resident Diane Coleman was among the first wave of people let in the room where Obama will speak.

The Democrat says she voted for Obama twice and would vote for him again if he could run. She emphasized that speaking negatively of Republican President Donald Trump could alienate some voters.

Obama will head to Richmond, Virginia, on Thursday evening to rally support for Democrat Ralph Northam in his race against former Republican National Committee chairman Ed Gillespie.

___

1 a.m.

Former President Barack Obama is returning to the campaign trail to stump for Democratic gubernatorial candidates in New Jersey and Virginia as they gear up for next month's elections.

Obama will first drop in on campaign workers in Newark, New Jersey, on Thursday for a private "canvass kickoff" for Democratic candidate Phil Murphy. He will then head to Richmond, Virginia, to rally support for Democrat Ralph Northam.

Murphy is leading in polls against New Jersey's Republican Lt. Gov. Kim Guadagno in the race to replace Gov. Chris Christie.

Northam is in a tight race with former Republican National Committee chairman Ed Gillespie.

An August NBC News/Wall Street Journal poll found that 51 percent of Americans said they have a favorable opinion of Obama, while 35 percent had a negative opinion.