Last year, aided by a new Republican governor, Pat McCrory, the legislature enacted one of the most far-reaching conservative agendas in the country, passing a “flattened” income tax that gives big breaks to the wealthy as well as new rules that limit access to voting, expand rights for gun owners and add restrictions for abortion providers.

And yet, in a tight race that could decide control of the United States Senate, it is Democrats who hold the advantage here in registered voters. Senator Kay Hagan, a Democrat, is preparing to face Thom Tillis, the state House speaker, a Republican, and Democrats have 2.7 million registered voters to the Republicans’ two million. About 1.8 million registered voters are not affiliated with a party.

The North Carolina of 2014, it seems, is neither red nor blue, but a shade of deep Dixie purple. It is a state where Republicans could retain control of the legislature for years, thanks to an aggressive 2011 redistricting and also because of white conservatives’ abandonment of the Democratic Party after years of post-Civil War fealty.

But it is also a state where a modern-day Democratic candidate like Ms. Hagan — or even like Hillary Rodham Clinton — may still dream of a statewide victory. African-Americans, who overwhelmingly vote Democratic, make up 22 percent of the population. Add to that a streak of true moderates, and the state’s white liberals, who can be found not only in the big cities of Raleigh and Charlotte, but sprinkled around the state — in the New Age boutiques of Asheville, the vegetarian-friendly cafes of Boone, the tech-sector office parks of the Research Triangle and in retirement homes from the Atlantic coast to the Great Smoky Mountains.

“It’s a place on the cusp,” said Marc Farinella, who was Mr. Obama’s state campaign director here in 2008. “There’s really a battle going on for the soul of North Carolina.”

A Political Mix

The presence here of so many liberal voters to compete with a robust core of conservatives may be because of North Carolina’s proximity to the more liberal Northeast.

The state also has a long tradition of intellectual liberalism closely tied to its universities.

And the development in the late 1950s of the Research Triangle Park — the corporate and technology research center near Raleigh, Durham and Chapel Hill — has been both a model for the government’s ability to foster development and a magnet for people and companies from outside the South.

The newest arrivals may be bolstering the liberal ranks. North Carolina’s population was the sixth-fastest growing in the United States from 2000 to 2010. Exit polling conducted by Edison Research in the 2012 election showed that non-natives supported President Obama over Mitt Romney by a margin of 51 percent to 48 percent, with more recent newcomers even more likely than longtime non-natives to vote for Mr. Obama.

But this is still the South. Conservative Democrats here limited the impact of the liberal New Deal policies in the 1930s, and today, Republican proponents of conservative values continue to find a broad, receptive audience.

The resulting mash-up is both cultural and political. North Carolina is home to voters like Mr. Kernodle, who, on a roasting August afternoon, explained that he had nothing against gay people, but was concerned, as a Christian, that the public school system appeared to be championing their cause. A few days later, Charlotte’s yearly gay pride parade rolled through its Uptown neighborhood, sponsored by the hometown economic behemoth, Bank of America.