State Sen. Bryce Reeves (R-Spotsylvania), center, gestures as Virginia Gov. Terry McAuliffe, right, and Virginia Sec. of Public safety, Brian Moran listen during a media conference at the Capitol. (Steve Helber/AP)

The Virginia Senate on Thursday approved the first piece of a gun deal hashed out between Gov. Terry McAuliffe (D) and Republicans, a measure that greatly expands the right to carry concealed handguns.

Passage, which came without debate and without support from 13 of the Senate’s 19 Democrats, elicited the first public criticism of the deal from Attorney General Mark R. Herring (D). The attorney general was not involved in negotiating the deal, which reversed a gun-control victory that he had pulled off in December.

“We can make real progress to remove guns from the hands of domestic abusers, but it should not need to come at the price of dangerous or irresponsible people carrying concealed handguns in Virginia,” Herring said in an email sent to The Washington Post through his spokesman. “The urgent work of reducing gun violence must continue.”

The bill was the first and most controversial piece of an agreement that the McAuliffe administration quietly negotiated in recent weeks with a Republican state senator and the National Rifle Association. The broader deal calls for strengthening some gun laws in exchange for the expanded right to carry concealed weapons. But gun-control advocates, who were left out of the negotiations, continued to press the governor to scuttle it.

After Thursday’s vote, grass-roots activists delivered thousands of petition signatures to the governor’s office. Former New York mayor Michael R. Bloomberg (I), whose gun-safety group bankrolled $2 million in TV ads for McAuliffe allies in state Senate races last fall, launched a biting social-media campaign against the governor.

Nonetheless, the measure moved forward. “This legislation is . . . simply doing the right thing by law-abiding Virginians,” said Sen. Bryce E. Reeves (R-Spotsylvania), who sponsored the bill and led negotiations with the administration.

McAuliffe, who has said the agreement as a whole will make Virginians safer, continued to cast the deal as a win for all Virginians.

“The Governor’s top priority is making our communities safer, and this compromise will do just that by taking guns away from domestic abusers and significantly expanding background checks at gun shows,” McAuliffe’s spokesman, Brian Coy, said in an email.

The concealed-carry bill, which passed 27 to 13, would reverse action by Herring to sever reciprocity rights of gun owners in 25 states with ­concealed-weapons standards looser than Virginia’s.

The bill, which is expected to pass by an even wider margin in the GOP-dominated House, directs the attorney general to reach reciprocity agreements with any state that offers them. That represents a substantial expansion of conceal-carry rights for out-of-state gun owners traveling to Virginia and Virginians who travel out of state. Current law allows for reciprocity only with states with standards on a par with Virginia’s.

Before Herring’s action, Virginia had concealed-carry reciprocity with 30 states. After the measure is enacted, it could be 48 states and the District. (Vermont doesn’t have a permitting process for concealed carry.)

Gun-control advocates said that policy is dangerous, pointing to states such as North Dakota, which issues permits to people convicted of stalking, and Alabama, which lacks any training requirements, according to Bloomberg’s group, Everytown for Gun Safety.

Other pieces in the package meant to tighten restrictions will come before the General Assembly in the form of separate bills.

One bill would make it a felony for someone subject to a two-year protective order to possess a gun. Possession for such a person is illegal under federal law. But because local police, not federal agents, respond to domestic incidents, abusers could more likely face charges. And because possession would be a felony, anyone convicted would lose the right to carry a firearm for life.

Another bill calls for putting a state trooper at every gun show to run background checks for private sellers who want to ensure their customers are not barred from buying. But those checks would remain optional.

A few hours after the Senate vote, a small group of activists arrived at the Capitol Square tower that houses McAuliffe’s office. A staffer was dispatched to the front door to accept the 3,000 signatures from Andy Parker, the father of Alison Parker, a Roanoke TV reporter shot on live television along with cameraman Adam Ward in August.

“The NRA and their local minions are the only ones that are celebrating,” Parker said.

A day earlier, Everytown launched ads against McAuliffe on Twitter and Facebook featuring side-by-side photos of the governor and the National Rifle Association’s Wayne LaPierre.

“What do VA Gov. Terry McAuliffe and NRA head Wayne LaPierre have in common?” read one ad. “Both Gov McAuliffe and NRA Head Wayne LaPierre support allowing dangerous people to carry hidden loaded weapons in Virginia.”

While clearly a lower-budget affair than last fall’s Senate blitz, Everytown’s campaign against McAuliffe was a stunner, given how closely he worked with gun-safety groups since his 2013 campaign for governor. He won the race while bragging about his F rating from the NRA.

“This isn’t about national politics,” Coy said when asked about the Bloomberg ads. “It’s about making Virginia safer, and that is what this agreement will do — plain and simple.”

But later Wednesday, McAuliffe talked up his “historic agreement” on MSNBC’s “Hardball with Chris Matthews.” The host asked McAuliffe, who was chairman of Hillary Clinton’s 2008 presidential campaign, how her strong rhetoric against the NRA might play in a rural state like New Hampshire.

“If you can do it Virginia, which is the home of the NRA, working together,” McAuliffe said, “we can do this anywhere.”