WASHINGTON (AP) — Former President Barack Obama is stepping back into the political spotlight for the first time since leaving the White House, publicly stumping for Democratic gubernatorial candidates in Virginia and New Jersey in preparation for this fall's elections.

Unlike more low-key appearances earlier this year, Obama's foray into two states Thursday won't be a one-and-done. The former president is planning more public appearances as the year closes, and preparation for the all-important 2018 midterm elections begins.

"Obama seems to be determined to be an engaged and active former president who's playing a role in different issues and is involved in politics," Rutgers University professor David Greenberg said.

Obama is hoping to sway voters in New Jersey and Virginia, the only two gubernatorial races this year. Both Virginia Gov. Terry McAuliffe, a Democrat, and New Jersey Gov. Chris Christie, a Republican, are term-limited out of office. Those races will be considered a bellwether of Democrats' strength in the face of President Donald Trump's victory last year and first year in the White House.

Obama will first drop in on campaign workers in Newark, New Jersey, for a private "canvass kickoff" for Democratic candidate Phil Murphy, who is running against Republican Kim Guadagno. The former president will then head to Richmond in an effort to help boost Democrat Ralph Northam in his campaign against Republican Ed Gillespie.

At the end of the month, Obama goes to Chicago to head up his first Obama Foundation leadership summit on Oct. 31 and Nov. 1, bringing in speakers like England's Prince Harry, former Italian Prime Minister Matteo Renzi and artists like Gloria Estefan, Chance the Rapper, and indie rock band The National.

Obama's popularity is still undeniable. In an August NBC News/Wall Street Journal poll, 51 percent of Americans said they have a favorable opinion of Obama, while 35 percent had a negative opinion. In the same poll, 36 percent said they had a positive opinion of Trump and 52 percent had a negative opinion.

In Richmond, thousands of people lined up Tuesday afternoon to get tickets to Obama's rally.

Retired Richmond social worker Nancy Jackson, 67, said she missed Obama "tremendously" and wished he could serve a third, fourth and fifth term. She said black voters like herself have been despondent since Trump took office. "I think Obama will bring some light to the end of the tunnel," she said.

Next to her was William Merriman, 63, an electrician from Richmond, who said Trump stirred racial division with his comments after the deadly white nationalist rally in Charlottesville this summer. He said Obama's appearance will give Northam a major boost with Virginia's black voters. "Obama will be a breath of fresh air with the direction this country's going right now," Merriman said.

Obama never completely disappeared from public life, in part because of Trump's constant criticism and efforts to undo much of Obama's legacy after eight years in office. He has publicly defended his policies that Trump and the GOP-led Congress have set out to dismantle: the Affordable Care Act — or Obamacare — and the Deferred Action for Childhood Arrivals program, which allowed immigrants brought into the country illegally as children to be temporarily shielded from deportation.

Trump is phasing out the DACA program, giving Congress six months to act before recipients' work permits begin to expire, and last week stopped federal payments to health insurers that keep costs down for low-income consumers on Obamacare.

Obama was forced to return "pretty quickly," presidential historian Julian Zelizer of Princeton University said.

"The current president has changed all the conventional assumptions about what to do," Zelizer said. "There is a sense of urgency that makes this moment different than others and former President Obama has continued to be directly in Trump's line of fire — both his policies and his legacy."

Surrogates also have been quick to defend Obama from Trump criticisms, including recent remarks that Obama did not call families of U.S. military members killed in action.

The former president has attended two fundraisers for Democratic causes since leaving office, one for the Democratic National Committee in Washington, and one for the National Democratic Redistricting Committee chaired by his former U.S. attorney general Eric Holder. Obama has also quietly, and with little notice, dropped in on schools in the Washington, D.C. area, where he and former first lady Michelle Obama now live, and has made surprise appearances in Chicago around his foundation work.

___

Jesse J. Holland covers race and ethnicity for The Associated Press. Contact him at jholland@ap.org, on Twitter at http://www.twitter.com/jessejholland or on Facebook at http://www.facebook.com/jessejholland. You can read his stories at AP at http://bit.ly/storiesbyjessejholland and other stories by AP's Race & Ethnicity team at https://apnews.com/tag/Raceandethnicity.

Associated Press journalists Alan Suderman in Richmond, Virginia, and Emily Swanson in Washington, D.C., contributed to this report.