WDBJ-TV reporter Alison Parker and cameraman Adam Ward were shot to death on the air in August. (AP)

A gun-safety group launched by former New York mayor Michael Bloomberg is weighing into a critical Virginia Senate race with a $700,000 ad buy, featuring the father of a Roanoke TV journalist who was shot to death on the air in August.

From Thursday through Election Day, Everytown for Gun Safety will bankroll TV, radio and online ads for Democrat Dan Gecker. He is in a tight race against Republican Glen Sturtevant for the suburban Richmond seat being vacated by retiring Sen. John C. Watkins (R-Powhatan).

The race is one of a handful expected to decide control of the closely divided state Senate. The outcome will probably determine whether Gov. Terry McAuliffe (D), already without leverage in the GOP-dominated House, has any sway with the legislature for the remaining two years of his term.

The size of the ad buy — it approaches the $772,000 that Sturtevant’s whole campaign raised through September, and more than half of the $1.2 million that Gecker took in — reflects the enormous stakes the Senate race has for McAuliffe. His ability to deliver Virginia for his good friend and presidential hopeful Hillary Rodham Clinton in 2016 will be in question if Democrats cannot win control of the Senate this year.

The commercial also reflects Democrats’ calculation that tighter gun control can be a winning issue, even if some of the tragic shootings they highlight could not have been prevented by the changes they seek. The ad calls for closing a loophole that allows buyers to avoid background checks if they buy guns from private sellers at gun shows.

WDBJ reporter Alison Parker, 24, and cameraman Adam Ward, 27, were shot and killed in August by a disgruntled former colleague, Vester L. Flanagan II. Flanagan legally bought his gun from a licensed dealer, passing required background checks. There was nothing in the way of a criminal or mental-health history to prohibit his purchase.

Parker’s father, Andy Parker, acknowledges in the ad that “we can’t stop all gun violence,” but he says it makes sense to tighten whatever loopholes are out there. The ad, titled “Condolences,” opens with him speaking directly into the camera.

“My daughter, Alison, and her cameraman were gunned down on live television,” he says. “I know we can’t stop all gun violence, but we can save lives if our leaders take action.”

A narrator picks up from there, saying: “Closing background check loopholes would help keep guns out of the hands of dangerous people. But that won’t happen with Glen Sturtevant in the Senate. The gun lobby gives Sturtevant an A. They’re funding his candidacy. He’ll make Virginia families less safe.”

Parker then closes the 30-second spot with: “Politicians’ condolences aren’t enough. It’s time for them to act.”

Matt Brown, Sturtevant’s campaign manager, said the Republican cares about gun violence and would work to find “common ground on a difficult issue that has touched us all.”

“Glen is the father of three young children,” Brown said. “His brother was at Virginia Tech on the day of that tragic shooting; his father worked at the naval yard in Washington and had colleagues lose their lives on that terrible day in 2013. His thoughts and prayers are with all the victims, and their families, of gun violence. Glen is committed to ensuring that our federal and Virginia gun laws are strictly enforced and no one ineligible to possess a firearm does so, that our brave men and women in law enforcement have the resources they need to keep us safe, and that we do a better job of identifying and treating mental illness before it leads to tragedy.”

A group of Richmond-area law enforcement officials — including two sheriffs and two prosecutors — and former state attorney general Jerry Kilgore (R) issued a statement criticizing the ad and praising Sturtevant’s “unwavering commitment to keeping Virginia families safe.”

“That’s why all of us, who live here in the Richmond area unlike Mayor Bloomberg, have endorsed Glen for State Senate,” the statement said.

Stacey Radnor, a spokeswoman for Everytown, said it will spend about $700,000 to distribute the ad. The group has already put down $370,000 for network TV, and more network ad time is in the process of being purchased, she said. The rest will be spent on cable, radio and digital, she said.