Gov. An Hee-jung, affiliated with the main opposition Democratic Party, speaks at a meeting with supporters in the central city of Daejeon, South Korea, in January. An has expressed his intent to take part in the presidential primary. (YONHAP/European Pressphoto Agency)

He’s styling himself as the “hope and change” candidate competing against an establishment figure in South Korea’s Democratic Party primary contest. So what’s An Hee-jung calling himself? “An-Bama,” of course.

“I think changing the public’s attitude from frustration and pessimism to excitement is the biggest gift that a politician can give to the people,” An, a progressive positioning himself as a centrist on foreign policy, told The Washington Post in his campaign headquarters on a recent day.

“Then, we need to deal with the unfair economic disparities and reform our economic system,” he said, citing inequality in the labor market as well as the huge power that South Korea’s massive conglomerates have over small and medium-size enterprises.

The little-known governor of the central province of Chung­cheong, An has suddenly become a viable contender in South ­Korea’s next presidential election — whenever it may be held.

The Constitutional Court is set to decide whether to impeach President Park Geun-hye, who is embroiled in a corruption scandal, by March 13. If she is ousted, the election must take place within 60 days. If Park avoids impeachment, elections are scheduled for December.

The main opposition Democratic Party is wasting no time, preparing to hold primaries regardless. Moon Jae-in, a party stalwart who ran for the presidency in 2012 only to lose to Park, had been considered something of a shoo-in for the nomination.

But An has surged in popularity since he announced he would run, breaking through the 20 percent support line, although he has since slipped a bit, while Moon has been scoring about 32 or 33 percent. An’s team is ready to roll out posters for the primary campaign featuring An and former U.S. president Barack Obama, with the message to think once more before voting in the primary — and to vote for An.

The conservative camp, meanwhile, is in disarray. The president’s party split into warring factions after the National Assembly voted in December to impeach her, and the man who had been considered Park’s natural successor, former U.N. secretary general Ban Ki-moon, dropped out of contention.

Conservative hopes are resting on Hwang Kyo-ahn, the prime minister, who has taken over Park’s duties while she awaits the court decision. But Hwang hasn’t indicated whether he will run.

For An, the key challenge is to win the Democratic Party nomination.

“For him, winning the primary is winning the presidency,” said Lee Chung-min, a professor at Yonsei University who gives An a 40 percent chance of getting the nomination. “His challenge now is to flip Moon’s supporters.”

An is trying to do this in two ways: by portraying Moon as the past and himself as the future, and by striking a centrist tone on foreign policy to appeal to the center, particularly when it comes to dealing with irascible North Korea.

At 52, An is a youngster by South Korean political standards, and his good looks and happy demeanor have fans comparing him to K-pop boy-band stars.

He’s an active user of social media, posting photos of himself jumping in the air, hugging happy children or relaxing in his pajamas with his cat. In a nation of suits, he often wears turtlenecks, and he has proved to be a good sport on talk shows, even carrying a comedian onstage and ending up in a pile on the floor.

“If he’s able to use his boyish image and social media to send a subliminal message to Moon supporters, he has a chance,” Lee said.

A student activist during the 1980s who rallied against the American military presence in South Korea, An fell in with the late Roh Moo-hyun, a liberal maverick who became president in 2003. An was convicted of irregularities in Roh’s election financing and spent a year in jail.

When it comes to policy, there is little disagreement across the political spectrum that major change is needed to kick-start South Korea’s anemic economy. South Koreans have long bristled at the power of the conglomerates, known here as “chaebol,” but have been afraid that change would inflict huge economic pain on the country.

That thinking has shifted during the scandal embroiling the president, which centers on allegations that the chaebol, particularly Samsung, paid bribes to win favorable treatment from the government, thereby becoming even more powerful.

This shift means that the main point of difference between presidential candidates is foreign policy and national security.

“Everyone agrees we need to do something about the chaebol,” said Shim Jae-hoon, a veteran political commentator. “It’s North Korea that will be the deciding factor, and that will clinch the presidency in the next election.”

As did former president Roh, rival candidate Moon comes from the progressive camp that favors engagement with Pyongyang as a way to minimize tensions and the economic gap between the two Koreas.

Moon has said that he would go to Pyongyang if elected president and would seek to reopen the inter-Korean industrial park at Kaesong, which Park’s government closed, saying the money was going into North Korea’s weapons program.

But An has struck a very different tone. South Korea should stand with the international community in imposing sanctions on North Korea to punish the regime for its nuclear belligerence and to keep some leverage over Pyongyang, he said.

That stance doesn’t, however, mean he’s opposed to talking.

“I think there should be ­inter-Korean dialogue, but I believe that we need to take our time,” he told The Post.

The onetime activist warns against reading too much into his youthful anti-American protests, saying he was a product of his time.

He talks about the importance of South Korea’s military alliance with the United States and has voiced his support for the THAAD antimissile battery that the U.S. military plans to deploy to South Korea to guard against the North, saying that he would respect the agreement made between the two countries.

For all his identification with Obama, he’s not fazed at the prospect of dealing with President Trump.

“Some people might think Trump is tricky and difficult to deal with, but he’s a businessman, so he could be easier to deal with; things could be simpler,” An said.

An knows that his hopes rest on capturing the middle of the electorate, appealing to conservatives who want a hard-line approach to North Korea and would never vote for Moon.

“I think that this is the direction that a progressive party needs to take,” he said, referring to his centrist positions on foreign policy and national security alongside a traditional left-wing stance on rectifying economic disparities.

So, does he think he can win? An pauses and looks down, then up again with an impish grin.

“Yes, I think I’m going to win.”

Yoonjung Seo contributed to this report.