WASHINGTON — It took just 12 hours and one word for the nation’s newly minted marquee governor’s race to devolve into accusations of racism and socialism.

Andrew Gillum won a surprise victory in the crowded Democratic gubernatorial primary in Florida on Tuesday. But before he had a chance to celebrate, he was mixing it up with the president of the United States on Twitter and responding to what the Florida Democratic Party chairwoman called “racist dog whistles” and what he called a “full bullhorn” from his Republican opponent.

It’s just a taste of what it will take for him to win what is already the most expensive governor's race in history and become Florida’s first black governor in what’s shaping up to be a bruising base-on-base contest.

Republicans say Gillum, the mayor of Tallahassee, has no idea what he’s in for, while allies say his unusual coalition of people of color, white progressives and billionaires can carry the day — though they acknowledge it won't be easy.

“We now have a very tough contest before us,” said Rep. Frederica Wilson, D-Fla., who is black and called Gillum’s win an “Obama moment.”

Gillum's first day as his party’s nominee started with Trump blasting him on Twitter as a “failed Socialist Mayor.” Gillum responded with a taunt: “@ me next time.”

What our state and country needs is decency, hope, and leadership. If you agree, join us at https://t.co/fm0ODFFGWU. Also, @ me next time, @realDonaldTrump. https://t.co/59dQy8RLsm — Andrew Gillum (@AndrewGillum) August 29, 2018

Then his opponent, Rep. Ron DeSantis, R-Fla., a Trump ally who won his own primary on Tuesday, used a Fox News interview to warn Floridians not to “monkey this up” by electing Gillum. He also called Gillum “articulate.”

Republicans, like everyone else, expected to be running against Gwen Graham, the politically moderate daughter of former governor and senator Bob Graham. They were thrilled to instead get Gillum, a Bernie Sanders-backed progressive who has been unable to shake associations to an FBI investigation in Tallahassee city government.

“Floridians do not want socialism, we do not want to abolish ICE, we do not want single payer, we do not want Andrew Gillum and his radicalism,” Republican National Committee spokesperson Kayleigh McEnany said on Fox News.

“So we are very excited about the results last night. Well done, Democrats,” McEnany added.

Even some Democrats have privately wondered if Gillum got lucky in the crowded primary and is in for a surprise in the general. His deep-pocketed opponents didn't attack him directly, and he won a narrow plurality.

But Gillum allies say he’ll beat the odds precisely because he’s willing to take bold stands, like offering support for legalizing marijuana, expanding Medicaid and impeaching Trump.

“Andrew's whole life has been a test,” said Kevin Cate, a Gillum adviser who has known him for years. “Every odd and obstacle that could be placed in front of Mayor Gillum, from the time he was growing up in Richmond Heights in Gainesville, he's overcome.”

“He made history last night because he's authentic,” Cate added. “That's the same formula that we're going to use to win the general.”

Gillum was the fifth of seven children born to a construction worker and school bus driver who became the first person in his working-class family to graduate from college.

In high school, his potential political talent shone so bright that The Gainesville Sun profiled him as an “outstanding leader” and predicted a bright future. Now, he's hoping to become only the third black governor in history.

Both major party gubernatorial candidates are 39, but where Gillum’s resume tells a story of pluck, DeSantis’s is all polish.

The congressman has degrees from Yale and Harvard, a Bronze Star for his service in the Navy as a legal adviser to the SEALs, and some local celebrity from playing for a team that went to the Little League World Series.

Trump, a known fan of Ivy League pedigrees, has touted DeSantis’s education three times on Twitter — including back in 2012, when DeSantis was making his first run for Congress. “Yale, Harvard Law,” Trump tweeted six years ago. “Very impressive.”

But Patrick Murphy, a Democrat who was elected to Congress the same year as DeSantis, said DeSantis can come off as “too cool for school.”

“He's one of the most arrogant members of Congress, and that's saying a lot,” said Murphy, who is no longer in Congress after losing his 2016 Senate bid. “The first time you meet him, I almost promise he will tell you where he went to college and what baseball team he played on within 10 minutes.”

In a state the size of Florida, however, just a fraction of voters will have a chance to actually meet either man. Many more will learn about them through TV ads.

Republicans are planning to hit Gillum hard and fast right out of the gate, hoping to define him early as a radical leftist with a mayoral record that saw rising crime rates and ethics issues.

To respond, Gillum will need money, and lots of it. He was vastly outspent in the Democratic primary — $6.6 million, compared with a combined $96 million from the four other main candidates — but will have some help from liberal billionaires Tom Steyer and George Soros, who have taken unusual interest in the race.

Small online donations are sure to pour in, too. Sen. Bernie Sanders, I-Vt., who held a rally for Gillum, took the rare step of tapping his massive online fundraising list Wednesday to ask supporters to donate to Gillum. “We could not have done it without you, senator,” Gillum said on Twitter.

A Democrat hasn’t been elected governor in Florida since Lawton Chiles in 1994, and Gillum's approach looks and sounds nothing like his, nor that of the party’s 2014 gubernatorial nominee, former Republican Charlie Crist.

Democrats say they are encouraged by the turnout in Tuesday’s primary, which was up up almost 60 percent over the 2014 midterm showing.

But the state remains stubbornly divided, 50-50, which means Democrats need to both energize their base and win over swing voters, said Steve Schale, a Florida Democratic strategist who backed Graham.

“It's still a state that is very evenly balanced,” said Schale — who, like Graham, quickly got behind Gillum. “Democrats that think Andrew's not going to be able to connect with suburban white women and typical swing voters aren't paying attention to what's happening around the country.”

Gillum in 2014 overwhelmingly won the mayorship in Tallahassee, which is about 57 percent white, 35 percent black, and 7 percent Latino. Statewide, however, whites are an even larger majority at 77 percent, and midterm electorates tend to be whiter than the overall population.

"We are ready to double down, and Andrew Gillum is the path to getting there," said Maria Urbina, the political director for the liberal group Indivisible.