Image copyright AP Image caption Major businesses and celebrities have protested the law

The US justice department has told North Carolina that its law limiting protections for LGBT people violates national civil rights laws and must not be implemented.

The law invalidated several local anti-discrimination measures that protected gay and transgender people.

It also requires people to use public toilets that correspond to the sex listed on their birth certificates.

The governor has responded by accusing the justice department of "overreach".

His office must confirm by Monday that the law will not be implemented, the department said.

Governor Pat McCrory said the threat of legal action and the risk of losing federal funds represented new ground in the powers of the federal agency.

The state could lose millions in federal funding for education if it upholds the law, known as House Bill 2.

"The right and expectation of privacy in one of the most private areas of our personal lives is now in jeopardy," Mr McCrory said.

"We will be reviewing to determine the next steps."

House Bill 2, approved in March, sparked a huge backlash.

Media playback is unsupported on your device Media caption Why the N Carolina bill is so controversial

Bruce Springsteen was among many musicians who cancelled concerts and major businesses pulled out of the state.

Companies like Bank of America and Apple have criticised the law.

A justice department letter states that the law violates part of the Civil Rights Act banning discrimination based on sex.

Image copyright AP Image caption The state's governor has defended the law as a privacy issue

The letter is not legally binding but essentially warns the state it is at risk of being sued.

Supporters of the law said allowing transgender people to choose their restroom could lead to women and children being attacked.

They said they feared that men could pose as transgender people and use legal protections as a cover.

Mr McCrory has made some small adjustments to the law but kept firm on the restrictions on public toilets.