A Georgia congressional election in a historically conservative district is headed to a runoff that raises the stakes in an early measure for President Trump and both major parties ahead of the 2018 midterm elections.

Democrat Jon Ossoff, a 30-year-old former congressional staffer, fell a few percentage points shy of an outright victory amid an 18-candidate scramble in Georgia's 6th Congressional District. Republican Karen Handel, a former Georgia secretary of state, finished a distant second, qualifying for the June 20 runoff.

The winner will succeed Republican Tom Price, who resigned the seat to join Mr. Trump's administration as health secretary. But the matchup in greater Atlanta's northern suburbs is just as much about Mr. Ossoff and Ms. Handel acting as proxies for the nation's roiled political atmosphere.

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 in such a district – a Republican has held the seat since 1979, and Dr. Price won 62 percent of the vote in November – encourages the opposition movement that has flourished since Trump's election. Yet falling short also highlights the party's lingering power deficit in Washington and around the country.

"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 a closer-than-expected win in a House special election last week in arch-conservative Kansas. It also serves notice that GOP candidates may always struggle to handle Trump's polarizing effects; he engenders an intense loyalty among his core supporters but alienates many independents and even Republicans.

Handel has treated Trump gingerly throughout, rarely mentioning him unless she's asked and even then cautioning she isn't a "rubber stamp" for anyone.

"I certainly support the president and will work with him where we agree," Handel told The Associated Press at one of her final campaign stops before polls opened. "But my job ... is to be the representative for the people of the 6th District, and that's what I believe regardless of who is the president."

That distinguished her from other Republican contenders she left to squabble over who is more loyal to Trump. One of Handel's closest competitors, technology executive Republican Bob Gray, even donned hip waders for one television spot as he paid homage to the president by, literally, draining a swamp.

The campaigns, advocacy groups and even the president himself moved quickly to frame Tuesday's outcome in their favor.

Handel began to consolidate a fractured party. She trailed Ossoff by more than a 2-to-1 margin, but drew immediate endorsements from some of her fellow GOP candidates and national party leaders, including House Speaker Paul Ryan (R) of Wisconsin. She did not immediately get a nod from the conservative Club for Growth, a Washington organization that spent six figures attacking her as a big-spending "career politician."

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. "There will certainly be a clear contrast," Handel told AP.

Trump, who took to social media in the campaign's closing days to heckle Ossoff and encourage Republicans, crowed on his personal Twitter account: "Despite major outside money, FAKE media support and eleven Republican candidates, Big 'R' win with runoff in Georgia. Glad to be of help!"

In fact, Trump 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.

As Trump carried out his Twitter barrage against Ossoff earlier Tuesday, a White House spokeswoman insisted the race wasn't a "referendum" on the president. He just "hopes to have a Republican elected," Sarah Huckabee Sanders said.

Ossoff has capitalized on anti-Trump energy while still trying to appeal to independents and moderate Republicans – his only path to victory.

"This is not a story about me. This is a story about this community at this moment in history," he said Tuesday night, casting the race as a choice about "the kind of country" the United States will be, though he never named Trump.

Republicans have made their own attempts at nationalizing the campaign.

Get the Monitor Stories you care about delivered to your inbox. By signing up, you agree to our Privacy Policy

A political action committee backed by Mr. 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.

Handel spends most of her efforts touting her record in public office, but makes a point to join in the Pelosi bashing. Ossoff, she says, is Ms. Pelosi's "hand-picked" candidate.