Virginia’s Republican-led House and Senate sustained Gov. Ralph Northam’s veto of a bill banning “sanctuary cities” on Wednesday but rejected his amendments to anti-gerrymandering legislation.

With both chambers under narrow GOP control, legislators never came close during their one-day “veto session” to mustering the two-thirds majority needed to override any of the Democratic governor’s 10 vetoes.

Northam (D), who ran for office last year as a consensus-builder, made sparing use of his veto pen compared with his predecessor, Terry McAuliffe (D), who vetoed a record 120 bills over four years.

Among the bills Northam vetoed were those that would have capped contingency fees that private law firms can earn when the attorney general hires them to represent state agencies; prohibited the state from participating in regional greenhouse gas initiatives without legislative approval; banned local governments from setting a minimum wage for government contractors; and blocked the General Assembly from tinkering with legislative district lines more than every 10 years.

Though Northam prevailed on all of those bills, the legislature rejected a slew of his amendments on matters as massive as Metro and as mundane as mulch. Those bills will return to Northam, who can choose to sign them in their unamended form or shelve them with a veto that the legislature has no opportunity to override.

The legislature killed Northam’s amendment to fund the mass transit system through two regional taxes. It also nixed his amendment to a bill intended to protect the rights of homeowners to spread mulch around their homes, a measure meant to undercut local ordinances that ban the ground cover as a fire hazard. Northam’s amendment would have prevented assisted-living facilities, college dorms and hotels from ducking local mulch restrictions.

“I evaluate legislation by one standard — whether it makes life better for the people who call Virginia home,” Northam said in written statement afterward. “I thank the General Assembly for engaging in a conversation on how we can best accomplish that goal.”

There was little debate on most of the vetoed bills given the long odds for overriding them. One exception was a bill sponsored by Del. Ben Cline (R-Amherst) that would have prohibited Virginia localities from designating themselves as “sanctuaries,” or zones where local officials refuse to enforce federal immigration policies. Cline, who is running for Congress, argued that while Virginia has no sanctuary cities, it does have localities that refuse to cooperate with federal immigration officials.

He cited a recent Fairfax County Board of Supervisors meeting in which Immigration and Customs Enforcement officers were not allowed to speak on immigration-related issues, and noted that several supervisors asked the county police chief and sheriff to ensure that ICE agents are not able to easily arrest anyone who is not already the target of a criminal investigation.

“That is actively interfering with the enforcement of federal immigration law,” Cline said. “Those who would say we don’t have sanctuary cities in the commonwealth, well, we certainly seem to have a problem with sanctuary policies.”

But Del. Alfonso H. Lopez (D-Arlington) argued that enlisting local law enforcement to round up undocumented immigrants would discourage immigrants from cooperating with police.

The 51-to-48 party-line vote fell well short of the 67 needed to override the governor’s veto.

The House and Senate had an easier time pushing back against some of Northam’s “unfriendly” amendments to bills, something that required only a simple majority vote.

The House and Senate rejected Northam’s amendments to two identical anti-gerrymandering bills, proposed by Sen. David R. Suetterlein (R-Roanoke) and Del. S. Chris Jones (R-Suffolk). The bills sought to establish standards for drawing congressional and legislative districts that would, among other things, require compactness. Northam inserted language requiring that “existing communities of interest should be considered” so that districts do not split up “groups of people with similar social, cultural or economic interests.”

Jones, one of Northam’s closest friends on the Republican side, urged the House to reject the changes and said the governor had not sought his blessing.

“I was not consulted — I was informed,” Jones said. The amendment failed on a 51-to-48 party-line vote.

One hefty subject, the state budget, was off the table because the veto session was only for bills that passed during the regular session that concluded March 10. A standoff over whether to expand Medicaid prevented the legislature from passing a budget.

A special session on the budget began last week, with the House on Tuesday passing a $115 billion, two-year spending plan that would allow up to 400,000 Virginians to enroll in the federal-state health insurance program for the poor. The measure now heads to the Senate Finance Committee. The state needs a budget in place by July 1 to avoid a shutdown.

An earlier version of this story incorrectly reported that Gov. Terry McAuliffe issued a record-breaking 111 vetoes. He issued 120 vetoes. This story has been updated.