VIRGINIA prides itself on being a birthplace of enduring democratic traditions. It was here that America made its first foray into representative government: in 1619, the House of Burgesses was created to govern the Virginia colony in partnership with a governor appointed by the British crown. Since then, however, Virginia has lived down some troubling distinctions.

The year 1619 also saw the delivery of the first African slaves. Their descendants would be liberated by the Civil War more than 200 years later but were shackled anew at the start of the 20th century—by the successor to the House of Burgesses, the General Assembly—under Jim Crow segregation laws that denied most black people the vote and other rights until the federal courts and Congress intervened in the 1960s.

As Virginia settles into the 21st century—it is now a mostly suburban state that, in presidential elections, comfortably tipped to Democrats Barack Obama and Hillary Clinton—new twists on the old, disturbing ways are becoming more apparent.

A Republican-dominated General Assembly is churning out legislation targeting the new minorities: Asian and Hispanic immigrants and LGBT Virginians, all of whom have a growing presence in the vote-rich metropolitan areas that favour Democrats. Such legislation—and the pointed debate it engenders—sharply contrasts with the image of Virginia as a forward-thinking, Upper South state that began to emerge in 1989 with the victory of L. Douglas Wilder as the nation's first elective governor.

That profile has been burnished in popular culture, too. Recent Hollywood films have shared with a mass audience Virginia stories that, while often bitter, foretold a brighter future for benighted African-Americans. This includes a remake of “The Birth of Nation” (pictured above) that focuses on the Nat Turner slave revolt in the 1830s. Also, “Loving,” the eponymous account of the 1960s struggle, by a rural inter-racial couple whose marriage was not recognized by Virginia, to overturn in the Supreme Court the last of the nation’s anti-miscegenation laws. “Hidden Figures” explores the contributions of largely unknown black female mathematicians to America's space programme during its early days, when part of its operations were based in still-segregated Virginia.

And though Virginia is a suburban-dominated state in which the majority of residents are non-natives with increasingly moderate views that favour Democrats, hyper-partisan gerrymandering has allowed Republicans, for most of the past 15 years, to maintain a firm grip on the legislature.

That allows Republicans to focus on ideas that matter most to their narrowing, conservative and largely rural base. They do not appear to mind that this projects, to an audience beyond Virginia, a discomfiting picture of America's 12th-largest state.

Among them: a North Carolina-type bathroom bill, requiring that Virginians use the lavatory that corresponds with the gender on their birth certificate. Eager to avoid the economic backlash endured by North Carolina, the Republican leadership buried the measure. But that only frustrated cultural conservatives for whom Republican hostility to LGBT rights is an article of faith. They may have been calmed, somewhat, by a separate bill allowing Virginians—for religious reasons—to refuse service to gays.

Republicans are also pushing a requirement that residents registering to vote must produce a birth certificate. Likely to be vetoed by Terry McAuliffe, the departing Democratic governor, the bill would be the latest obstacle to voting pressed by Republicans in what Democrats say is a continuing effort to suppress turnout of their most reliable voters: seniors, students, minorities, and foreign-born newcomers.

The debate over these issues is a preliminary proxy battle over higher stakes. In November, Virginia will choose a new governor. The election is likely to be viewed as early referendum on the Trump presidency. Republicans no longer control Virginia’s statewide offices, such as governor and United States senator. And they are desperate to win back the governorship, if only to perpetuate Republican legislative power into the 2030s.

The next governor, in 2021, will accept or reject new legislative boundaries based on the previous year’s census. Population growth and accelerating diversity favour the Democrats, but those trends can be blunted with gerrymandering. A map that favours the Republicans is almost certain to be put in place if there is a Republican governor to sign it.

But Republicans may not want to get ahead of themselves. The Supreme Court this year could overturn, as illegal racial gerrymandering, the current boundaries for the House of Delegates. If the justices do so, a fresh map would probably be drawn by a federal court. Because Mr McAuliffe and Republicans are unlikely to agree on boundaries, map-making would fall to a panel of three judges unencumbered by the very thing driving Virginia’s politics to extremes: partisanship.