A city in Alabama has recalled a local law which prevented transgender people from using public lavatory facilities consistent with their gender identity.

The law, passed by the city council in Oxford was believed to be the first in the US to threaten those breaking the bathroom rules with imprisonment or fines.

Those breaking the law could have faced six months in jail or a $500 fine, raising legal and privacy concerns regarding how the law would have been enforced.

Eva Walton Kendrick, HRC Alabama State Director, said in a statement: “It’s a great day in the state of Alabama and we commend Councilperson Charlotte Hubbard for leading the recall effort.”

"This sends a welcome message of inclusion to Oxford’s families, businesses and visitors, and sets an example for other communities that may be considering similar legislation. Fair-minded Americans do not believe in discrimination, and we must continue to educate one another on the importance of being inclusive and welcoming to all. ”

Oxford’s ordinance was unprecedented in its establishment of criminal penalties for violations. The law applied to bathrooms and lockers citywide, including private businesses.

North Carolina Governor Pat McCrory. ( Chip Somodevilla/Getty Images) (Chip Somodevilla/Getty Images)

The decision comes after the City Council of Rockwall, Texas, unanimously rejected a bill proposed by Mayor Jim Pruitt that would have prohibited transgender people from using bathrooms consistent with their gender identities.

This week, North Carolina was given five days to scrap its anti-LGBT legislation - HB2 - by the US Justice Department, or risk losing billions of dollars of federal funding.

The US Department of Justice notificed Governor Pat McCrory that the law violates the U.S. Civil Rights Act, Human Rights Campaign reported.

Cirque du Soleil cancelled shows in North Carolina last month in protest at the state’s new anti-LGBT law.