RICHMOND — Republican House Speaker Kirk Cox, running for reelection in a district radically altered by a court decision, unleashed a sharply negative ad this week that his opponent says twists her stance on police in schools.

The ad quotes a snippet from a two-year-old radio interview to suggest that Democrat Sheila Bynum-Coleman wants police removed from schools.

Bynum-Coleman, the daughter of a former Richmond police officer, was clear in the interview that she wants police at schools to ensure safety but doesn’t think they should handle minor disciplinary matters.

The ad represents a departure from Cox’s mostly upbeat messaging, suggesting that the speaker is feeling pressure from his underdog challenger in a pivotal election year, with all 140 House and Senate seats on the ballot and Republicans defending razor-thin majorities in both chambers.

Cox is running for a seat he has held for a generation but he’s in unfamiliar territory: As a remedy to racial gerrymandering, a federal court ordered more than two dozen House districts redrawn. The speaker’s district, a suburban-rural mix just south of Richmond, became significantly less white and less Republican.

“The court-ordered redesign of the district has created a greater threat to his reelection than he’s faced in many years,” said Stephen J. Farnsworth, a University of Mary Washington political scientist. “And this is how many incumbent politicians respond to increased threats. . . . Context is the first casualty of October. As the election draws near, people look for sound bites or sometimes sound half-bites that can be of use.”

Bynum-Coleman’s campaign manager, Rob Silverstein, said the ad misrepresents the challenger’s position in “an attempt to stoke fear among the residents of the 66th District.”

“My father was a Richmond City police officer and I am a mom with kids in public schools, so the safety of our communities, and particularly of our children, is my top priority,” Bynum-Coleman said in a written statement. “As I said in the actual clip, when police are in our schools, they should be able to focus on safety and not on disciplining our children, which too often disproportionately affects students of color and leads to a school-to-prison pipeline.”

Cox’s campaign stood by the ad, which quotes one sentence from an interview Bynum-Coleman gave on an Internet radio show in 2017.

“It’s pretty hard to be a misrepresentation of Ms. Bynum-Coleman, when the ad uses a recording of her own words,” Cox spokesman Parker Slaybaugh said in a written message.

Roles were reversed last month, when Cox’s campaign said Bynum-Coleman misrepresented his position on teacher raises in one of her ads. PolitiFact gave its worst rating — “Pants on Fire” — to her commercial.

As the state’s most powerful Republican, Cox (Colonial Heights) has mostly used a soft sell to introduce himself in his revamped district south of Richmond. The retired teacher and baseball coach wooed voters with moon bounces and outdoor movie nights during the summer, and aired feel-good biographical commercials, including a 60-second cinematic ode to his time as “Coach Cox.”

The new TV ad strikes an entirely different tone. It opens with an image of Bynum-Coleman, combined with a short clip of audio from an interview she gave to a program called “Reasonable Voices.”

In extended remarks in the interview, Bynum-Coleman said she was concerned that police were being used to enforce minor infractions at schools, a practice that she says feeds the school-to-prison pipeline. But she also expressed a need to have police at schools for safety reasons.

“We don’t want children getting into fights, we don’t want them walking into class late, we don’t want them being disruptive in the classrooms, but do we want to send them to prison?” she said in the interview. “I think there’s an alternative here, and I think that we need to get the police out of the schools. The police need to be there for safety measures and to make sure the school is safe, not to incarcerate children and deal with disciplinary actions. And that’s what’s taking place, and so the school-to-prison pipeline is exploding.”

Cox’s TV ad quotes only one line from the interview — “We need to get the police out of the schools” — playing the audio, then flashing those words several times on the screen. A group of mothers — “Real moms. Not actors” — are shown sitting around a table, clutching coffee cups and fretting about the prospect of unpoliced schools.

“That’s scary,” one says. “I don’t want my kids in an environment where they’re not going to be safe.”

“They’re community helpers. They’re heroes. They’re good people,” another says.

A third pipes up: “They’re there as an added layer of protection.”

A fourth: “I just want my daughter to be safe.”

The first mom sums things up: “As a mom, I just wouldn’t vote for Sheila Bynum-Coleman. I just wouldn’t.”

It’s hardly uncommon for political messaging to go negative as Election Day nears.

“The sweetness of summer is moon bounces and hot dogs,” Farnsworth said. “The gritty reality of fall is the attack ad.”

Last month, Bynum-Coleman aired an ad claiming that “Cox joined special interests to deny teachers raises.”

One of the votes cited to support that claim was a 2013 vote against the budget — cast by another Cox, then-Del. John Cox (R-Hanover). Kirk Cox voted for the budget.

The campaign came up with new citations to back the claim, but PolitiFact still found them wanting. Since 2005, Cox voted for seven budgets that raised teacher salaries and voted twice to cancel the raises because of lagging state revenue, PolitiFact found. It said there was no proof that “special interests” were behind his votes to rescind the raises.

Bynum-Coleman, a real estate agent, has never held elective office. In 2017, amid backlash against President Trump’s election, she came close to unseating veteran Del. Riley E. Ingram (R-Hopewell) in an adjacent district. The new maps placed her in Cox’s district for this year’s race.

The redrawn district swung from favoring Republicans by 26 points to tilting toward Democrats by six, from 76 percent white to 58 percent, and from 18 percent black to 34 percent, according to the nonpartisan Virginia Public Access Project.

Many independent political observers say defeating the speaker remains a tall order. But a competitive race will force Cox to spend time and money that otherwise could go to other Republicans.

Bynum-Coleman raised $470,000 from January through Aug. 31, with $341,000 on hand heading into September. Cox raised $1.2 million over the same period and had $590,000 in the bank.