RALEIGH, N.C. (AP) – The U.S. Justice Department said Wednesday that a North Carolina law limiting protections to LGBT people violates federal civil rights laws and can’t be enforced.

The Justice Department’s intervention puts the state in danger of losing hundreds of millions of dollars in federal school funding.RELATED | Ohio lawmakers to consider controversial bathroom bill

In a letter to Gov. Pat McCrory, the department put the state on notice that federal officials view the state law as violating federal Civil Rights Act protections barring workplace discrimination based on sex. Provisions of the state law directed at transgender state employees violate their anti-discrimination protections, the letter said.

“The State is engaging in a pattern or practice of discrimination against transgender state employees and both you, in your official capacity, and the state are engaging in a pattern or practice of resistance” of their rights, the letter said.

McCrory has defended the state law, which limits legal protections to lesbian, gay, bisexual and transgender people. It also requires transgender people to use public bathrooms that conform to the sex on their birth certificate.

The Justice Department’s letter said the law also violates Title IX of the Civil Rights Act, which bars discrimination in education based on sex. That could lead to North Carolina losing hundreds of millions of dollars in federal school funding.Keep checking NBC4i.com for real-time updates on this story. To get alerts for breaking news, grab the free NBC4 News App for iPhone or Android. You can also sign up for email alerts.What others are clicking on: