Washington (CNN) The former mayor of Greenville, North Carolina, will win the Democratic primary in a special election in the state's 3rd Congressional District, CNN projected Tuesday night. The Republicans, meanwhile, are heading for a runoff in their own race.

Allen Thomas won 50.02% of the Democratic vote, according to the North Carolina State Board of Elections website.

With all precincts reporting, it appears the Republican primary is heading to a July 9 runoff between Greg Murphy and Joan Perry. No Republican candidate surpassed 30% of the vote in the primary, which was required to avoid a runoff.

Murphy serves in the state Legislature and is a urologic surgeon, according to the Legislature's website. He won 22.54% of the Republican vote, according to the state board of elections.

Perry has never before run for office and is also a doctor, according to her campaign website. She won 15.44% of the vote, according to the state board of elections.

Read More