RICHMOND, Va. (AP) — A bill to charge law enforcement officers with a Class 6 felony if they engage in sexual relations with a detainee has unanimously passed both chambers of the Virginia General Assembly.

Del. Karrie Delaney, D-Centreville, said she proposed House Bill 5045 to close a loophole in the law which currently does not make it illegal for police officers to have sexual relations with someone who has been detained.

“This puts people in a clear power imbalance at a very vulnerable time if they were detained by an officer with ill intent that wanted to take advantage of someone in that situation,” Delaney said. “Unfortunately, that has happened and that is ultimately the purpose of this law.”

Virginia law states employees of correctional facilities or jails cannot have sexual relations with someone in their custody, such as inmates, parolees or pretrial defendants.

“Where we saw that we needed to close the gap further was for law enforcement officers who are detaining individuals pre-arrest,” Delaney said.

In a recent five-year period, 23 people were convicted of felony carnal knowledge of an inmate, parolee, probationer, or pretrial or post trial offender, according to the bill’s impact statement.

The Prison Rape Elimination Act was the first federal law to deter sexual assault of inmates. The measure was passed by Congress in 2003 and signed into law by President George W. Bush. Experts conservatively estimated, according to the 2003 bill, that at least 13% of the inmates in the United States have been sexually assaulted in prison.

Central Virginia Regional Jail in Orange County has a system in place to train officers and inmates as an attempt to prevent sexual assault. Lt. Brian Bachert, the policy and compliance manager at the jail, said he teaches classes to inform inmates of the rights outlined by the federal bill.

Bachert said that although the act was put in place to protect sexual assault victims, inmates may sometimes take advantage of the measure.

“Inmates like to use PREA as a means to manipulate their housing,” Bachert said. “If they don’t like someone in their housing unit, they may say that person sexually harassed them.”

He said the jail investigates sexual assault allegations and there are repercussions in place for those who make false allegations, such as loss of commissary, visitation and recreational rights.

Delaney said bills similar to hers have been introduced before and received unanimous support but did not pass due to budget restrictions.

“Anytime there is a new crime, there is a cost associated with that because there’s a presumption that any time a new crime is created that there may be some costs with the court and potentially jail,” Delaney said. “I think it was a matter of prioritization with the budget, but I think that now we’ve had the opportunity to really put our criminal justice system in the spotlight during the special session.”

The Virginia Criminal Sentencing Commission estimated a minimum of $50,000 be assigned to the bill, according to the impact statement. Delaney said the bill received bipartisan support from both chambers.

“This, I think, was a vital part of police reform that is a very common sense, common ground solution,” Delaney said.

Gov. Ralph Northam must next sign the bill for it to become law.