Minnesota lawmakers want to crack down on how tech companies use student data and how schools monitor district-issued devices once kids leave the classroom.

Measures under consideration in the state House and Senate would limit how long companies are allowed to keep student data on file and bar businesses from advertising to families based on the information

The legislation, which the Minnesota chapter of the American Civil Liberties Union called "an important and critical move toward protecting students' privacy," also would limit school access to district-issued devices once students take them home.

"Increasingly powerful technology makes it easier and easier to conduct warrantless surveillance by secretly tracking a student's location, seeing into a student's bedroom via a webcam, or even flagging a student's body language as 'suspicious,'" Julia Decker, the Minnesota ACLU's policy director, told legislators in written testimony.

Privacy experts say the legislation, if passed, would put Minnesota's student data statutes in line with the majority of the country. Forty-one states have at least one law on the books that regulates how companies and school districts can use student data, according to the Future of Privacy Forum, a Washington, D.C.-based advocacy organization.

Bailey Sanchez, policy counsel with the Future of Privacy Forum, said the proposed legislation, while fairly strict, strikes a balance between protecting student privacy and allowing school officials to step in if children access problematic content on district-issued devices.

"Parents are trusting the school with their children and have some level of expectation that the school might take action if there are things happening on devices that are potentially sensitive," she said. "It's a tricky balance."

Concerns over digital surveillance and privacy have made headlines for years as social media companies and advertisers have come under intense scrutiny over their handling of user data.

The federal Family Education Rights and Privacy Act already places strict limits on the information schools can release about individual students without their consent, such as enrollment status, grades and test scores.

But that law doesn't regulate what data that schools can collect and use internally. Nor does it limit how tech firms use anonymized data while under contract with a school or district.

Rep. Sandra Feist, DFL-New Brighton, told a House panel in February about math software her daughter used in class that then "relentlessly" pushed parents to pay for a subscription.

"I have seen firsthand how companies profit off our children's educational data," she said.

Privacy advocates, including the ACLU, also contend that surveillance of school-issued tablets and laptops places a disproportionate burden on students from low-income households who may use those devices to communicate with friends outside of the classroom.

Anthony Padrnos, executive director of technology for the Osseo school district, told the Senate Education Finance and Policy Committee that the line between home and classroom has blurred as schools send students home with devices rather than textbooks.

That means schools are trying to balance the need to ensure students are only accessing age-appropriate material on those devices while maintaining their privacy.

"This is a priority that keeps us up at night," Padrnos said.

Sanchez said the proposed bills largely accomplish that. Both would create a slew of laws that would take effect for the next school year, and Sanchez believes it's unrealistic to expect district administrators to become familiar with all of the new provisions in a matter of months.

"The technology is complicated," she said. "Schools are complicated."