North Carolina receives more than $4 billion in federal education funding each year. Now the federal government is considering withholding that money because, the Justice Department says, the state has passed a law that violates the civil rights of transgender individuals by forcing them to use bathrooms that correspond to the sex on their birth certificates instead of their gender identity.

But would federal officials really withhold billions of dollars meant to help educate poor children, children with disabilities, and college students who can’t afford to go to school without federal aid?

They’ve done it before.

The federal government withheld funds in the 1960s from more than 100 school districts in the south that refused desegregation, according to Gary Orfield, an  education scholar and co-director of the Civil Rights Project at the University of California-Los Angeles.

“That was the first time in American history that there had been a massive cutoff of federal aid funds,” Orfield said. “And it worked dramatically.”

School districts adopted plans to integrate to turn the federal-funds spigot back on.

The withholding of money was a new tool in the federal government’s civil rights arsenal, made possible by the Civil Rights Act of 1964. Before that law was passed, the federal government hadn’t had a way to cut off funds on civil rights grounds.

It wasn’t just schools that saw the impact: Hospitals across the south, too, were forced to change discriminatory policies after they began receiving Medicare funding the 1960s. The funding provision in the nation’s central civil rights law, Orfield said, was “the absolute key to breaking the apartheid system of the south.”

The federal government has pulled funding only occasionally since that era, Orfield said.

In the early 1980s, for example, the federal government withheld scholarships to low-income students at Grove City College, a small private Christian college in Pennsylvania, after the school refused to promise to comply with Title IX, the federal law barring discrimination based on sex. The college objected and the case went all the way to the Supreme Court, which issued a mixed decision: The Education Department was within its rights to strip the grants, but it was only the college’s financial aid program — not the whole institution — that had to comply with Title IX.

In 1990, the department terminated its federal assistance to DeKalb County schools in Georgia after the district refused to give federal officials the access they needed to investigate claims that the district had discriminated on the basis of a disability. The district came into compliance in 1991 and became eligible again for federal funding.

But even though the Education Department uses its power to strip funding rarely, school districts know that the threat is not an empty one — and that often makes them willing to comply with federal civil rights directives.

“This is a nuclear weapon that you don’t want to use. But the fact that it exists and it’s used sometimes tends to make people very much more interested in settling,” Orfield said.

The Obama administration has been more aggressive about threatening to withhold education funds on civil rights grounds than any administration since that of President Lyndon Johnson, Orfield said.

Last year, the U.S. Education Department’s Office of Civil Rights opened more than 3,000 investigations related to issues ranging from sexual violence and racial discrimination to the treatment of English language learners and students with disabilities. The department reached more than 1,000 settlement agreements with districts and colleges, according to its annual report.

Critics accuse the Obama administration of using the threat of withholding money to force school districts to go beyond what federal civil rights law actually requires.

And that — the unsettled question of what federal law really requires regarding protections for transgender people — makes the fight over transgender students’ access to bathrooms somewhat different than the fight over desegregation, Orfield said. By the 1960s, courts had made clear that segregated schools were illegal. But today, federal law regarding the civil rights of transgender people is still evolving.

The Education Department has not yet issued a decision about North Carolina school funding. A spokeswoman said its review is ongoing.