Amid testimony of young children traumatized by hours trapped in small rooms and parents left in the dark about their treatment, Virginia lawmakers advanced a bill Monday to restrict the use of seclusion and restraint in public schools.

Alex Campbell, 9, testified that he was trapped in a converted storage closet six or seven times before he told his parents. He said an administrator at his elementary school told him that if he did, he would be put back there the next day.

Seven years old at the time and autistic, he said he was never told why he was secluded for anywhere from 30 minutes to two hours, with a desk blocking the door. Finally, he told his parents.

“I begged them not to go back to school,” he said. “The thought of going into that room scared me.”

The boy’s testimony before a Senate subcommittee helped the bill advance despite the testimony of opponents, including advocates for principals and school boards, who said that sometimes restraint is necessary to keep a situation from escalating dangerously.

Monday was an especially busy day, as the General Assembly kicked off the first full week of its 2015 session and the federal holiday freed up activists on a range of issues to travel to the state Capitol to press their case.

Large crowds tried to grab the attention of legislators, who were jolted about midday by the news that Gov. Terry McAuliffe (D) had been hospitalized. McAuliffe underwent a procedure to drain fluid that had built up around his lungs, the result of a horseback-riding accident over Christmas that also broke seven of his ribs. McAuliffe’s spokesman said he was continuing to work from the hospital and should soon be back to a full schedule.

Gun rights and gun-control activists were among the most visible contingents in Richmond, where the topic is a perennial flash point. The former wore orange “Guns save lives” lapel stickers as well as handguns, which are permitted inside the capitol. The latter, including relatives of students killed or injured at the 2007 Virginia Tech massacre, donned yellow “Background checks save lives” stickers.

Monday was also a day when Republicans, who took control of the Senate in June, struck down several bills reflecting McAulliffe’s legislative priorities, including measures meant to raise the minimum wage and to outlaw anti-gay discrimination in housing.

At a morning news conference, House Republicans rolled out an agenda they said was focused on “kitchen-table” issues. Hours later, the House Appropriations Committee passed two bills intended to make college more affordable by capping student athletic fees and giving some schools more flexibility over procurement and other administrative decisions.

Democrats and Republicans were able to unite on some issues. After hearing testimony from a man who said he was abused by a T-ball coach as a child, the Senate Courts of Justice Committee voted unanimously to require state police to create a supplement to their sex offender registry. It would include information on people who were convicted of certain sexual offenses that predate the creation of the registry in 1994. Those convictions are already a matter of public record, but the supplement would make them more accessible by posting the supplement on the state police Web site.

More emotional testimony came on the subject of restraint at schools.

Sean Campbell testified that he had trouble finding out from school officials why his son, Alex, “was being locked away like a common criminal.” He said he eventually learned that his son was secluded for tearing paper, running around, banging on the door — not endangering himself or other students.

Heather Luke testified that her son Carson, also autistic, ended up with several broken bones at age 10 after five staff members shoved him into a concrete seclusion room. The attempt to force him in ended with Carson in the emergency room with a broken bone in his foot, two broken bones in his hand and an open wound on his palm so deep it required surgery, she said.

Carson is now at a school in Maryland that manages behavior with research-based interventions, Luke said, and “his aggression has almost been extinguished.” But he has not slept through the night since the 2011 incident.

The bill from Sen. Barbara A. Favola (D-Arlington), which passed unanimously out of a subcommittee of the Senate Education and Health Committee, would require the state Board of Education to adopt regulations in line with 2012 federal principles on the use of seclusion and restraint.

A lobbyist for the Virginia School Boards Association said the legislation was too much too fast, “like going in an automobile from 0 to 100.” School principals also voiced concern, saying that while there “is no excuse for abusive educators,” the cost of training would be prohibitive. But the subcommittee advanced the bill.

“I am not an advocate for federal regulations,” said the subcommittee chairman, Charles W. Carrico Sr. (R-Grayson). But, speaking as a parent, he said, “it would not be pleasant” if he learned that these techniques had been used on his child.

The federal principles demand that restraint or seclusion never be used except in situations involving imminent danger and after other interventions have proved ineffective. Mechanical or chemical restraints should be banned, and students should be visibly monitored at all times. Teachers should be trained in the use of effective alternatives; the use of restraint and seclusion should be subject to regular review; and parents should be notified immediately when they are used.

Federal civil rights officials have also begun to investigate improper use of seclusion and restraint more aggressively in recent years, finding that students with disabilities and students of color are more likely to be disciplined in this way. Earlier this year, a federal investigation into two Prince William County public schools found that students with emotional disabilities were frequently and inappropriately restrained, secluded and removed from classrooms. A 2009 Government Accountability Office report found instances of severe injury and even death following the use of restraint and seclusion in the previous two decades.

At the moment, Virginia is one of 10 states with official guidelines on the issue but no regulations, according to a January 2014 report from the Autism National Committee. (Five more have no law or guidelines at all.) A disability advocate testified Monday that fewer than half of state public schools properly follow the guidelines.

An attempt in Congress to limit the use of restraint and seclusion passed the House in 2010 but has since stalled.

Favola said she has entered a budget amendment for $75,000 to implement the new regulations and would ask for additional funds in 2016 to cover the cost of training.

Laura Vozzella contributed to this report.