The Biden administration proposed a rule change on Thursday that would allow schools to block some transgender athletes from competing on sports teams that match their gender identities. But the proposal would also prevent schools from enacting across-the-board bans.

Under the Department of Education proposal, “categorically” barring transgender athletes in that way would be a violation of Title IX, which prohibits sex discrimination at educational institutions that receive federal funding.

But it would give universities and K-12 schools the discretion to limit the participation of transgender students, if they conclude that including transgender athletes could undermine competitive fairness or potentially lead to sports-related injuries, a key part of the debate about transgender athletes in women’s sports.

It is the first time that the administration has substantively weighed in on the highly charged debate. The Department of Education said the proposal was meant to “advance Title IX’s longstanding goal of ensuring equal opportunity in athletics” and to offer “much needed clarity” about how public schools, as well as colleges and universities, should navigate a contentious issue.

It is certainly not going to close the door on disagreements.

Elementary school students would generally be able to participate in school sports according to their gender identity, under the proposal. But at more competitive levels, including high school and college sports, questions of physicality and fairness could prompt restrictions on transgender athletes.

The Education Department advised that schools would have to assess the ages of students and the level of the competition, as well as the nature of the sport itself. The impact may be different, for example, in track versus badminton.

The proposal must undergo a period of public comment. Once it is in effect, a senior official with the Education Department said, the federal government will be ready to investigate and enforce violations — up to and including withholding federal funding, if necessary.

Conner McLaren, a transgender field hockey player at her high school in central Ohio, took two tests at school on Thursday before hearing the news. “It’s exhausting,” she said, that such a rule is needed at all. And added, “I think it’s ridiculous that President Biden needs to step in to tell states they need to stop bullying trans kids.”

Her mother, Melissa McLaren, added, “It’s so exasperating that we have lawmakers trying to legislate her, when all she really wants to do is sing ‘Pitch Perfect’ on the bus to out-of-town games and throw up after she does too many burpees.”

But some transgender rights advocates worried about whether the proposal could open the door for future discrimination.

“The people that are seeking to prohibit trans people from participating would absolutely seek to apply this across the board,” said Sasha Buchert, a senior attorney with Lambda Legal, an L.G.B.T.Q. civil rights organization. They “would make the same arguments — whether we are talking about a 6-year-old playing soccer or someone playing varsity volleyball.”

Lambda Legal was involved in representing a transgender girl seeking to compete on girls’ cross country and track teams in West Virginia, whom the Supreme Court ruled in favor of on Thursday.

Ms. Buchert, who is transgender, anticipated that the new Biden administration rule could pave the way for a series of discrimination complaints from parents and families, challenging school districts. “It would be really helpful to understand how the department is going to investigate those,” she said.

Conservatives and critics quickly jumped on the news, arguing that the Biden administration was destroying women’s sports.

“Good luck — this won’t fly in Florida,” Manny Diaz Jr., Florida’s education commissioner, said in a statement. “We will never allow boys to play in girls’ sports. We will fight this overreach tooth and nail. And we will stop at nothing to uphold the protections afforded women under Title IX.”

Polling that suggests a majority of Americans are opposed to participation by transgender women and girls in women’s divisions.

As it stands, 20 states have laws on the books that bar transgender students from participating in sports consistent with their gender identities, according to Movement Advancement Project, a think tank that focuses on gay, lesbian, bisexual and transgender parity.

Those laws would not be immediately undone by the Biden administration rule, said Dr. Elizabeth Sharrow, an associate professor of public policy and history at the University of Massachusetts Amherst.

Dr. Sharrow anticipated a new host of legal battles over the interpretation of the rule, as well as new legislation that might seek to “skirt through whatever space the regulation carves out for exclusion.”

The final rule will “stand for as long as the current administration is in office,” Dr. Sharrow said. “We could relitigate all of these questions again with a different administration who has a different political agenda at stake.”

The new proposal comes as transgender issues increasingly loom large — in sports and in politics — even as the actual number of transgender athletes remains small. About 1.4 percent of 13- to 17-year-olds and 1.3 percent of 18- to 24-year-olds identify as transgender, compared with 0.5 percent of all adults, according to a new report last year that found a growing embrace among young people.

The proposal did not appear to have any immediate effects on elite college sports. The proposed rules acknowledged that the National Collegiate Athletic Association had decided last year to set its rules sport by sport and essentially to follow guidelines set by major national and world governing bodies. The rules vary by sport.

World Athletics, the governing body for track and field, for instance, announced last month that transgender women who had gone through male puberty could no longer compete in women’s events in international competitions.

FINA, swimming’s world governing body, has essentially prohibited transgender women from the highest levels of women’s international competition. The governing body’s proposal creates a “open category” of competition to “protect competitive fairness.”

The move last year came just three months after Lia Thomas became the first transgender woman to win an N.C.A.A. Division I swimming championship, in the 500-yard women’s freestyle. Ms. Thomas has said that she hopes to try to qualify for the U.S. Olympic team in 2024, but the FINA ruling would prohibit that.

Riley Gaines, who competed against Ms. Thomas at the N.C.A.A. championships, is among those who argue that the Biden administration proposal would undermine the purpose of Title IX. “We want to protect the female category of sport,” said Ms. Gaines, who is also spokeswoman for the Independent Women’s Forum, a conservative women’s organization.

Doriane Lambelet Coleman, who competed in track and field internationally during the 1980s and is a professor at Duke Law School, said many aspects of the new rule were an “attractive” way to reconcile the issues around trans athletes, which span many institutions and levels of sports, from youth recreation to elite competition.

“Having a one-size-fits-all solution,” she said, would not make sense — even if the new proposal puts more of an onus on schools. Each of those institutions weighs “fairness and inclusion really differently,” she added, and it makes sense to take a more “bespoke” approach.