The federal government is waiving a policy that required students to come in-person to pick up free meals during school closures, after legislators and advocates said the rule was imperiling the health of children with compromised immune systems.

New guidance from the U.S. Agriculture Department, issued this week, allows school districts to distribute meals “to a parent or guardian to take home to their children,” according to a copy obtained by The Washington Post.

The waiver takes effect immediately and applies to all states that elect to use it. Schools will need to develop strategies to ensure the meal distribution plan retains “integrity,” Angela M. Kline, director of policy and program development for the USDA’s Child Nutrition Programs, wrote in the waiver.

Although the USDA envisioned “operators providing meals directly to children,” Kline wrote, the agency “recognizes that in this public health emergency, continuing to require children to come to the meal site to pick up meals may not be practical and in keeping with the goal of providing meals while also taking appropriate safety measures.”

The federal government notified school districts of the change late Wednesday. In a statement Thursday morning, Agriculture Secretary Sonny Perdue said feeding children whose lives are being upended by the coronavirus pandemic is a top priority for federal officials.

“We continue to waive restrictions and expand flexibilities across our programs,” Perdue said.

Following virus-related shutdowns, school districts across the country have converted their empty campuses into meal distribution sites — a key resource for an ever-escalating number of parents as unemployment spikes nationwide. But for families with immunocompromised children — at higher risk of contracting the virus and of dying if infected — the policy of in-person pickups was forcing wrenching decisions, as The Post reported this week.

One mother in Prince William County, whose 7-year-old daughter has a compromised immune system due to cancer treatments, said she woke each morning to an unbearable decision.

“Do I get the food and risk my child’s life?” asked the single mother, who recently lost her job as a driver due to the virus-fueled halting of daily life in America. “Or do we go hungry, but stay safe?”

Following publication of the article, a group of lawmakers — including U.S. Sens. Mark R. Warner (D-Va.) and Tim Kaine (D-Va.), Reps. Abigail Spanberger (D-Va.) and Gerald E. Connolly (D-Va.), and Virginia Del. Danica A. Roem (D-Prince William) — urged the USDA to change its rule.

In a joint letter to Perdue sent Wednesday, hours before the policy change, Warner and Kaine wrote that in-person food pickups are “burdensome on families and [place] children at increased risk — especially those who are immunocompromised.”

“Removing this restriction would go a long way to ensuring children in Virginia have access to healthy meals during this public health emergency,” Warner and Kaine wrote.

On Thursday, the lawmakers, along with Virginia school employees, lauded the new rules as a boon to the tens of thousands of children nationwide, and possibly more, whose immune systems are compromised.

“The recent waiver from USDA is an amazing victory for the community we serve and those who serve on the front line,” said Adam Russo, director of Prince William County Public Schools’ office of school food and nutrition services.

On Thursday morning, the mother of the 7-year-old drove to pick up food from a nearby school campus. She left her daughter at home.