Teachers in Virginia may soon gain the right to collectively bargain with the public school systems that employ them — signaling a historic shift for the state and a major victory for labor advocates nationwide.

Legislation backed by Democratic majorities in both chambers of the General Assembly would end a long-standing state law that forbids public employee unions from negotiating on salary and benefits. Virginia’s ban, adopted in the 1990s, makes it one of just three states to bar public-sector bargaining, alongside North Carolina and South Carolina.

The measure passed the House of Delegates along party lines and is before the Senate. If it becomes law — even opponents concede that appears likely — it would affect thousands of workers across Virginia, according to Del. Elizabeth R. Guzman (D-Prince William), who introduced the legislation in the House. Guzman said that in addition to educators, firefighters and police officers are among the workers who would gain bargaining rights.

“My bill would give teachers a seat at the table and a voice on the job,” she said.

The legislation would have national resonance, said Joseph E. Slater, a University of Toledo professor who specializes in labor and employment law. He said Virginia has for decades served as “America’s poster child, along with the two Carolinas,” for hostility to public-sector labor rights.

“There is supremely important symbolic weight here,” he said. The bill “would lift the spirits of labor in the United States.”

Jim Livingston, president of the Virginia Education Association, the state’s largest teachers union, noted that Virginia ranked seventh in school quality in a 2019 U.S. News & World Report survey. But teacher salaries rank 32nd in the nation, according to data compiled by the National Education Association, the country’s largest union.

Public school teachers in Virginia earn on average $51,994 a year, according to the National Education Association analysis — almost $10,000 below the national average.

“Apart from salary, this bill would let teachers negotiate things like improved technology, up-to-date textbooks, [which] have a direct impact on student learning,” Livingston said. “This is something that teachers have clamored for for many years.”

Detractors insist the measure is unnecessary. Mark Mix, president of the National Right to Work Committee, a nonprofit that battles against compulsory union membership, argued that “the relationship between Virginia government and its employees just shouldn’t have a third party in there” — referring to a union endowed with bargaining power.

The legislation could threaten Virginia’s financial stability, Mix warned. He said he believes the bill will encourage unions to promise members benefits the state cannot afford, sparking a fiscal meltdown.

“The wind is at the back of union officials, and this looks like it’ll be a big victory for them,” Mix said. “Unfortunately, it’s just as big a loss to taxpayers.”

Mix’s group is not giving up. As the bill moves to the Senate, National Right to Work Committee staffers are ramping up opposition: placing calls to members throughout the state, purchasing advertisements and launching petitions.

The Virginia Education Association began pushing for public-sector bargaining rights shortly after the November elections, when Democrats took control of the General Assembly for the first time in a generation.

“It’s a new day in Richmond, and that’s why this is possible now,” Guzman said.

The House approved the bill 54 to 45 on Feb. 6 along party lines: Every Democrat except one voted for the measure, while all Republicans voted against it. Guzman said she and her aides expect a similar divide in the Senate, although Democrats’ two-seat majority in that body means the legislation appears poised to come before Gov. Ralph Northam (D).

Northam will “carefully review this legislation if and when it reaches his desk,” his spokeswoman Alena Yarmosky wrote in a statement, adding that the governor “is focused on ensuring that all Virginians have access to a well-paid, safe and sustainable job.”

The partisan flavor of the debate is not surprising, Slater said: The Democratic Party has long been seen as more union-friendly than Republicans. In recent years, public-sector collective bargaining rights have become “an especially potent political football,” he said.

When Republicans won majorities in state legislatures throughout the nation in 2010, Slater said, many conservative lawmakers rejoiced at the opportunity to restrict public workers’ collective bargaining rights. The Republican-driven trend toward weaker bargaining rights gained strength in years since.

“So this bill would be a pretty stunning reversal of where things have been heading,” Slater said.

Mary Wurl, a sixth-grade math teacher in Fairfax County, never thought she would see her adopted state reconsider its bargaining policies, which she views as restrictive and unfair. Wurl, 61, grew up in “a union family in a union town”: St. Paul, Minn. Her father was a proud member of the Brotherhood of Carpenters and Joiners of America, and everyone she knew paid union dues because “it was just what you did.”

When Wurl began teaching in the St. Paul school system, she immediately joined the union. She remembers helping negotiate a contract that established a committee of teachers to advise the principal on disciplinary policy.

Things worked differently in Fairfax, Wurl discovered when she moved to Virginia with her husband about 13 years ago.

“The contract came out for the year, and I was like, ‘Wait a minute, did I miss the bargaining session?’ ” Wurl said. “Every year when I signed that contract, it felt wrong.”

Next year’s signature, she hopes, will bring a different sensation.