Virginia Governor Terry McAuliffe talks about gun violence Thursday in Richmond. (Bob Brown /Richmond Times-Dispatch via AP) (Bob Brown/AP)

Virginia Gov. Terry McAuliffe on Thursday ordered a ban on guns in state office buildings, part of a raft of measures he said was aimed at enforcing the state’s existing gun laws.

Underscoring the loss of life in high-profile shootings in the commonwealth, McAuliffe (D) signed an executive order while flanked by the parents of a TV journalist fatally shot this summer and by a gun-control activist whose daughter was wounded in the Virginia Tech massacre in 2007. The new rules immediately block gun owners from openly carrying firearms into state office buildings, such as local offices of the Department of Motor Vehicles, but a prohibition on concealed weapons will require a regulatory review process including public input.

“We remain determined to toughen Virginia’s lax gun laws,” the governor said at a news conference. “We have appealed to hearts. We have appealed to reason. And we will continue to make the case to lawmakers and the voters who elect them.”

The announcement, which comes less than three weeks before legislative elections that will determine which party controls the state Senate, had all the trappings of a political rally.

In the wake of mass shootings in the country, Virginia Gov. Terry McAuliffe bans people from openly carrying guns in state buildings. A ban on concealed firearms could take a month. (WUSA9)

A line of uniformed law enforcement officers from across the state — including Sheriffs Beth Arthur of Arlington County and Stacey A. Kincaid of Fairfax County — formed the backdrop for the state’s top Democrats to sound off on guns and the National Rifle Association.

Attorney General Mark R. Herring (D) recited grim statistics: 4,284 crimes were committed with firearms in Virginia in 2014, he said.

Sen. Timothy M. Kaine (D-Va.) gave an emotional speech about the 2007 Virginia Tech shooting, likening America’s response to the problem of gun violence to those who did nothing to stop the Holocaust.

“I pray none of us will be victims. I pray none of us will be perpetrators,” he said. “But for too long in this country, in this commonwealth, in our communities, we’ve had too many bystanders.”

Within minutes, Democrats seeking political office sent statements by e-mail saying that they, too, support gun control — an unabashedly liberal message that could inspire their supporters to vote on Nov. 3. Turnout is expected to be low for the off-year election, giving campaigns all the more reason to ramp up the rhetoric in the final weeks.

By using his executive authority, McAuliffe sidesteps a Republican-controlled legislature that has steadfastly opposed any effort to clamp down on gun rights.

McAuliffe has staked a position opposite Second Amendment stalwarts starting with his 2013 race against then-Attorney General Ken Cuccinelli II (R) and through to the last legislative session, where his bills went nowhere.

Thursday’s announcement will do nothing to alter the partisan battle lines. Republicans have said efforts to further regulate gun transactions and ownership won’t stop criminals determined to do harm.

“For years, we have consistently said the best way to keep Virginians safe is to enforce existing law,” said House Speaker William J. Howell (R-Stafford).

“Most importantly, the House of Delegates will continue to focus on investing in mental and behavioral health-care improvements that will have a meaningful impact on individual lives and our communities as a whole,” he said.

Del. C. Todd Gilbert (R-Shenandoah) called the ban on guns in state buildings “shortsighted” and hinted that lawmakers would try to reverse it.

“We will review this policy during the 2016 legislative session and take the appropriate action to protect the rights of law-abiding citizens,” he said.

The NRA waded into the political fight by highlighting McAuliffe’s long-standing connection to Democratic presidential candidate Hillary Rodham Clinton, who shares the governor’s views on gun control.

“If Governor McAuliffe and his former boss Hillary Clinton were serious about preventing tragedies like Virginia Tech and Roanoke instead of exploiting them, they’d address our nation’s broken mental-health system — that’s the real loophole,” NRA spokesman Lars Dalseide said.

McAuliffe’s order also creates a task force to prosecute gun crimes and identify gaps in the regulation of gun sales, sets up a statewide tip line and seeks to expand the forfeiture of guns in domestic violence and stalking cases.

Law enforcement officers are exempt from McAuliffe’s prohibition on guns in state offices, while state employees are already barred from bringing guns to work.

The ban does not apply to the historic Capitol building designed by Thomas Jefferson and the General Assembly’s office building, which have their own set of rules. Only people with concealed-carry permits, legislators and law enforcement officers are allowed to bring guns into those two buildings. That policy was instituted in 2004.

Two years later, then-Del. John S. “Jack” Reid, who routinely carried his handgun to his office during session, mistakenly fired the pistol. As luck would have it, the bullet struck a bulletproof vest hanging from the back of his closed office door.

No one was injured, except Reid, who suffered a cut on his hand from the gun’s slide snapping back.

Virginia is one of 14 states that allows guns into its capitol, according to the National Conference of State Legislature data from December 2014.