A Georgia congressional election is headed to a high-stakes runoff that's shaping up as a referendum on President Donald Trump ahead of crucial midterm elections next year.

Democrat Jon Ossoff, a little-known 30-year-old former congressional staffer, fell a few percentage points shy of an outright victory Tuesday amid an 18-candidate scramble in Georgia's 6th Congressional District. His strong showing in the conservative district, driven by eye-popping fundraising numbers from out-of-state donors, underscored Democrats' eagerness to get a win against Trump as they strive to take back House control in 2018.

Republican Karen Handel, a former Georgia secretary of state, finished a distant second in the crowded field, qualifying for the June 20 runoff.

Handel treated Trump gingerly throughout the campaign in a district he barely won in November. But the president called to congratulate her Wednesday morning, and Handel said she hoped he would come to campaign for her.

"I would hope so," Handel said on CNN. "I mean look, all Republicans, it's all hands on deck for us."

Trump had attacked Ossoff in recent days and took to Twitter again Wednesday morning to crow about the outcome in Georgia following Democrats' failure to win a different special election in Kansas last week.

"Dems failed in Kansas and are now failing in Georgia. Great job Karen Handel! It is now Hollywood vs. Georgia on June 20th," Trump wrote, alluding to celebrity donations that came in for Ossoff.

The close outcomes in conservative Kansas and Georgia underscored Democrats' potential to capitalize on surging liberal energy following Trump's election, but also pointed to the limits of how far they can go in Republican-friendly districts. Republicans hold a 237-193 majority in the House so Democrats would need to pick up more than 20 seats to retake control in the 2018 midterm, an uphill climb. Another special election is coming up in Montana next month.

David Goldman / AP Republican candidate for Georgia's Sixth Congressional seat Karen Handel speaks at an election night watch party in Roswell, Ga., on April 18, 2017. Republican candidate for Georgia's Sixth Congressional seat Karen Handel speaks at an election night watch party in Roswell, Ga., on April 18, 2017. (David Goldman / AP) (David Goldman / AP)

Democratic National Committee Chairman Tom Perez insisted Democrats have the momentum in the Georgia race, and made clear his party will not be shy about tying Handel to Trump.

"She's the person who supports Donald Trump's efforts to repeal the Affordable Care Act. I wonder if Donald Trump and she are going to campaign on that issue in her district," Perez said on CNN.

"We have a lot of wind at our back. The progressive energy out there is palpable," he added.

The winner in Georgia will succeed Republican Tom Price, who resigned the seat to join Trump's administration as health secretary.

Leaders in both major parties agree the race offers a prime test run for 2018 elections, because the affluent, well-educated Georgia district is replete with the kind of voters Democrats must attract to reclaim a House majority and win more gubernatorial and Senate races.

For Democrats, Ossoff's near win encourages the opposition movement that has flourished since Trump's election. A Republican has held the seat since 1979, and Price won 62 percent of the vote in November.

ERIK S. LESSER / EPA Supporters of Democratic candidate Jon Ossoff react during a special election night party in Atlanta, Ga., on April 18, 2017. Supporters of Democratic candidate Jon Ossoff react during a special election night party in Atlanta, Ga., on April 18, 2017. (ERIK S. LESSER / EPA) (ERIK S. LESSER / EPA)

"There is no doubt this is already a victory for the ages," Ossoff told his supporters, praising them for a campaign that has collected more than $8.3 million, most of it from well beyond Georgia.

Having already endured several million in attacks from national Republican outfits, Ossoff said he's ready for more. "Bring it on!" he said.

For Republicans, Ossoff's strong performance acts as another wake-up call alongside the closer-than-expected win in a House special election last week in archconservative Kansas. It also serves notice that GOP candidates may struggle to handle Trump, who engenders an intense loyalty among his core supporters but alienates many independents and even Republicans.

"We know what's at stake here and I don't think this is about any one person," Handel said Wednesday. "We all have to rise above it, that it is about a district that has a long legacy of Republican leadership."

In fact, Trump arguably gave Ossoff his opening in the first place. The president barely edged Hillary Clinton here in November, falling short of a majority four years after Republican Mitt Romney got more than 60 percent of the presidential vote.

Handel moved quickly to unite her fractured party, drawing immediate endorsements from some of her fellow GOP candidates and national party leaders, including House Speaker Paul Ryan. Republicans believe a two-candidate scenario will embolden conservative voters and make it harder for Ossoff to campaign above the fray as he has thus far.

Republicans have made their own attempts at nationalizing the campaign.

A political action committee backed by Ryan and other House GOP leaders funneled more than $2 million into attacks on Ossoff, tying him to national Democrats like House Minority Leader Nancy Pelosi. The California Democrat remains an unpopular figure in the district.