A bipartisan group of female legislators in the House are introducing a bill that would outlaw the shackling of pregnant women while they are incarcerated in federal prisons.

The legislation announced Thursday would also establish minimum standards of care for pregnant inmates and their babies, create training programs for guards handling expectant mothers, and set up a study to examine the care of pregnant women behind bars.

The bill essentially codifies a Federal Bureau of Prisons (BOP) policy that calls for not restraining pregnant women unless they are a threat to themselves or others, or are an escape risk.

The legislation follows a dramatic surge in the number of women incarcerated in recent decades and efforts in roughly two dozen states to end the practice of restraining pregnant women in jails and prisons because of health and safety concerns.

Rep. Karen Bass (D-Calif.) and Rep. Mia Love (R-Utah) are the bill’s two main sponsors. A majority of women on both sides of the aisle in the House have signed on as co-sponsors.

“Shackling women can endanger their pregnancy,” Bass said. “The idea that a pregnant woman is going to escape anywhere when she can barely walk is ludicrous. Shackling women on the wrists, waist and legs is a dangerous practice and a cruel practice.”

Medical experts say shackles can make pregnant women unsteady and prone to falling and injuring their fetus, increase the risk of complications during childbirth and interfere with doctors’ ability to provide health care. In 2012, a Nevada inmate sued the state Department of Corrections, claiming she suffered separation of her pelvic bones after being shackled during labor.

The American Medical Association and the American College of Obstetricians and Gynecologists oppose the shackling of women during childbirth. In 2008, the BOP instituted a policy that did just that in federal prisons. That policy was later expanded to prohibit shackling of pregnant women in most instances.

The current bill would bar all restraints on pregnant women during the period they are pregnant or in the weeks after. The bill would also block pregnant women from being placed in solitary confinement, where it can hard to access proper health care and nutrition.

Federal statistics on the number of pregnant women who are incarcerated have not been updated in years, but the number of women behind bars increased more than 700 percent between 1980 and 2016 from 26,000 to nearly 214,000, according to The Sentencing Project. The growth outpaced male incarceration by 50 percent.

The trend has spurred legislators and activists to focus on reforms affecting women behind bars, as part of broader efforts at bipartisan criminal justice reforms that have gained traction in recent years.

However, correctional officer unions and some prison officials have opposed bans on shackling pregnant women, saying such efforts create opportunities for flight, the chance women could hurt themselves and general safety concerns. The union representing federal correction officers did not respond to a request for comment, while a BOP official said they do not comment on pending legislation.