Updated

San Francisco Mayor Ed Lee said in a statement Friday he doesn’t want any city workers to travel to North Carolina unless necessary in wake of its legislation which blocks anti-discrimination for gay, lesbian and transgender people.

“We are standing united as San Franciscans to condemn North Carolina’s new discriminatory law that turns back the clock on protecting the rights of all Americans including lesbian, gay, bisexual and transgender individuals,” Lee said in the statement.

“Effective immediately, I am directing City Departments under my authority to bar any publicly-funded City employee travel to the State of North Carolina that is not absolutely essential to public health and safety.”

North Carolina Gov. Pat McCrory signed a bill this week to void a Charlotte ordinance that would’ve provided protections against discrimination in public accommodations.

McCrory, who was the mayor of Charlotte for 14 years and had criticized the local ordinance, signed the legislation Wednesday night that he said was "passed by a bipartisan majority to stop this breach of basic privacy and etiquette."

Although 12 House Democrats joined all Republicans present in voting for the bill in the afternoon Wednesday, later all Senate Democrats in attendance walked off their chamber floor during the debate in protest. Remaining Senate Republicans gave the legislation unanimous approval.

"We choose not to participate in this farce," Senate Minority Leader Dan Blue of Raleigh said after he left the chamber.

The law also prevents other cities and counties from passing anti-discrimination rules and imposes a statewide standard that leaves out protections based on sexual orientation and gender identity, according to KTVU-TV.

Gay rights leaders and transgender people said the legislation demonizes the community and espouses bogus claims about increasing the risk of sexual assaults. They say the law will deny lesbian, gay, bisexual and transgender people essential protections needed to ensure they can get a hotel room, hail a taxi or dine at a restaurant without fear.

"McCrory's reckless decision to sign this appalling legislation into law is a direct attack on the rights, well-being and dignity of hundreds of thousands of LGBT North Carolinians and visitors to the state," Human Rights Campaign President Chad Griffin said in a statement. Civil liberties groups pledged to push for repeal and were weighing legal options

Charlotte Mayor Jennifer Roberts, who pressed to get the anti-discrimination ordinance approved, said she was appalled by the legislature's actions.

"The General Assembly is on the wrong side of progress. It is on the wrong side of history," Roberts said in a prepared statement. But McCrory said in a release "the basic expectation of privacy in the most personal of settings" was violated by "government overreach and intrusion" by Roberts and the city council.

Lee applauded Roberts in his statement Friday for taking “steps at the local level to protect gay, lesbian, bisexual and transgender people from discrimination. I also applaud Atlanta Mayor Kasim Reed who is a champion for equality for all.”

Georgia is also embroiled in a religious liberty bill, which has passed the Georgia Legislature but Gov. Nathan Deal has yet to sign.

KTVU-TV reported that Facebook and Apple have expressed its displeasure with the North Carolina law.

The NBA has also mulled relocating its 2017 All-Star Game which was scheduled to be played in Charlotte. “[We] do not yet know what impact it will have on our ability to successfully host the 2017 All-Star Game in Charlotte,” the statement read. "The NBA is dedicated to creating an inclusive environment to all who attend our games and event," the association said.

The Associated Press contributed to this report.

Click for more from KTVU-TV.