RICHMOND — The Virginia General Assembly agreed Wednesday to make it legal for adults to possess up to an ounce of marijuana on July 1, nearly three years sooner than had been approved by the legislature in February.

Both the Senate and House of Delegates approved the earlier date as requested by Gov. Ralph Northam (D) during a one-day reconvened session called for tying up a series of legislative loose ends.

The Senate deadlocked 20 to 20 on the marijuana change, with Lt. Gov. Justin Fairfax (D) casting the deciding vote in favor. The House approved it 53 to 44, with two abstentions.

In the House and Senate, Republicans tried parliamentary maneuvers to keep the marijuana bill from being approved and argued that an earlier legalization date would foster an illicit marijuana trade while the state sets up its infrastructure for legal sales.

“If this change is to be undertaken, it has to be undertaken prudently,” Del. Christopher T. Head (R-Boutecourt) said.

Democrats said the changes would address the disproportionate impact that marijuana possession arrests have had on people of color and noted that a growing number of states — including Colorado and New York — have adopted similar laws legalizing possession.

“This is because there is a straightforward injustice to punishing people for something we’ve already agreed should be legal, especially when we know that the punishments are given out inequitably,” said House Majority Leader Charniele L. Herring (D-Alexandria).

In the Senate, several Republicans said they had hoped to vote for the bill but decided not to because of another amendment Northam proposed to the complex legislation that they viewed as a threat to the state’s right-to-work law.

Northam’s amendments provide that a cannabis retailer could lose its license if it doesn’t maintain neutrality if workers considered organizing; blocks access to a union; or doesn’t pay a prevailing wage under federal law.

Democrats countered that the license amendments have no impact on other industries and noted that they must be reenacted by next year’s General Assembly before they can take effect.

The legislature also approved a request from Northam to set aside $250,000 to investigate a state watchdog report that found violations in the way the parole board granted early release last year to a man convicted of killing a Richmond police officer in 1979.

The House and Senate voted along party lines to approve Northam’s proposal for an outside investigation into a Virginia Office of Inspector General report about the release of Vincent L. Martin, 63, who was serving a life sentence for the killing of police officer Michael P. Connors.

Republicans criticized the governor’s proposal as a “whitewash,” arguing that the entire parole board should be investigated after the inspector general’s report found Connors’s family members and local prosecutors were not properly notified before Martin was released, and leaked internal documents suggested that similar violations occurred in other cases.

“A whole bunch of badness may have been going on; we don’t really know,” said House Minority Leader Todd Gilbert (R-Shenandoah), accusing Democrats of trying to protect Northam and former governor Terry McAuliffe (D), who is running for governor this year, from a political scandal.

“I don’t know what’s going to happen in the fall, with the elections,” Gilbert said. “But I can tell you this, the Republican caucus is committed to using whatever power we have at our disposal, if we gain the majority, to look into this. Because somebody needs to do it, and this doesn’t do it.”

Democrats accused Republicans of seeking to politicize what should be a straightforward independent report. The investigation, which also will examine whether political pressure was used in releasing Martin or any other inmates, would be finished by June 15.

The Senate and House of Delegates observed extraordinary precautions to avoid spreading the coronavirus. The Senate gaveled into session about a half-hour after its scheduled noon start time in a cavernous room at the Science Museum of Virginia — the same place it met during the regular session that kicked off Jan. 13 and the special session that followed Feb. 10, which adjourned March 1. The House of Delegates met online.

The one-day session is an annual affair to take up any vetoes or changes to legislation proposed by the governor. Although Northam issued no vetoes to the Democratic-controlled legislature, he suggested amendments to about three dozen bills, including 18 changes to the state budget.

After an ambitious session in which the General Assembly approved — and Northam enacted — a law abolishing the death penalty, most of the matters on the agenda Wednesday were relatively routine.

One exception was the marijuana legalization plan, the first of its kind in the South. Lawmakers had put off the personal possession component until 2024 to give the state time to create a new oversight agency and build a regulated commercial market.

But advocates argued that in the meantime, people of color would continue being arrested on marijuana-related charges at a disproportionate rate — as has been the case since the General Assembly decriminalized possession of small amounts of marijuana last year. Black people are about four times more likely than White people to be arrested for possession and given a civil fine, state statistics show.

Even with the earlier date for legalizing possession, the law calls for the commercial market to go into effect on Jan. 1, 2024, and certain components of the complex plan would have to be reenacted by the legislature next year.

Both chambers also approved budget amendments introduced by Northam that provide for law enforcement personnel to be trained in detecting cases where people are driving under the influence of drugs, including marijuana. Another budget amendment funds marijuana prevention and education programs.

Northam also proposed speeding up the effective date of bills that provide for sealing or expunging some criminal convictions, including low-level marijuana charges. Rather than wait until 2025, as the bill requires, Northam would allow state agencies to begin the process of sealing criminal records as soon as they have the bureaucratic infrastructure in place to handle it. Both chambers approved that amendment Wednesday.

The House and Senate also gave final approval to a sweeping Voting Rights Act, which prohibits last-minute changes to polling places and guarantees voting access for people who are minorities because of their race or language.

Two gun-related bills were back with proposed changes. One banned firearms from the State Capitol, Capitol Square and state-owned office buildings; Northam proposed adding an exception for magistrates, an amendment that passed both chambers Wednesday. Another bill prohibits anyone convicted of assaulting a family member from buying a gun; Northam’s amendments would have made clear that the law covers domestic partners and would have extended the ban to five years from three. Although those amendments passed the House, they were rejected in the Senate.

The House passed an amendment that Northam proposed adding Prince William County, Manassas and Manassas Park to a bill that enabled Loudoun County to take over staffing of its health department, while the Senate initially deadlocked on it.

Some senators argued that allowing wealthy localities to take local control and boost staff salaries would disadvantage poorer parts of Virginia.

“What it sounds like is that we have a real problem statewide. . . . We really ought to look at the funding of health departments,” said Sen. Mark D. Obenshain (R-Rockingham).

But Sen. Barbara A. Favola (D-Arlington) argued that “nothing in this recommendation changes any state standard, any state requirement or any state expectation.” It allows localities to take over the staffing of their health departments, usually offering higher salaries to the employees.

Fairfax cast the deciding vote in favor of the amendment.

Both chambers also accepted an amendment making it easier for first responders who were infected with the coronavirus on the job to file for workers’ compensation, retroactive to July 1 of last year. The underlying bill had contained a date of Sept. 1, 2020.