PayPal cancelled plans for a new operation center that would have employed over 400 people in Charlotte, North Carolina, on Tuesday citing the state’s recently passed religious freedom law that critics say discriminates against the LGBT community.

“Two weeks ago, PayPal announced plans to open a new global operations center in Charlotte and employ over 400 people in skilled jobs. In the short time since then, legislation has been abruptly enacted by the State of North Carolina that invalidates protections of the rights of lesbian, gay, bisexual, and transgender citizens and denies these members of our community equal rights under the law,” Dan Schulman, president and chief executive officer of PayPal, said in a letter released on Tuesday.

“The new law perpetuates discrimination and it violates the values and principles that are at the core of PayPal’s mission and culture. As a result, PayPal will not move forward with our planned expansion into Charlotte.”

According to him, PayPal believes that every person has the right to be treated equally and with respect, which compels the company to “take action to oppose discrimination”.

“Our decision is a clear and unambiguous one. But we do regret that we will not have the opportunity to be a part of the Charlotte community and to count as colleagues the skilled and talented people of the region,” Schulman said.

Back in February, Charlotte city council passed a non-discrimination ordinance that extended rights to the LGBT community. One of the rights covered by the ordinance was the ability of transgender members of community to use the bathroom of the sex they identified with. It was in response to that that the state government introduced House Bill 2 (HB2) to overturn the ordinance.

“This action of allowing a person with male anatomy, for example, to use a female restroom or locker room will most likely cause immediate State legislative intervention which I would support as governor,” North Carolina’s Governor Pat McCrory wrote in an email to the city council members at the time.

“I encourage you to convince your colleagues to focus on issues most important to our citizens and this proposed change is not one of them. In fact, the City of Charlotte is causing more problems by trying to solve a problem that does not exist.”

After the HB2 was passed into a law, PayPal joined companies like Google, Apple, American Airlines, Marriott and Bank of America, which employs 15,000 people in North Carolina, in denouncing the new law. In the past, PayPal was named as a best place to work for LGBT equality by the Human Rights Campaign. PayPal has also publicly endorsed the Equality Act.

“As a company that is committed to the principle that everyone deserves to live without fear of discrimination simply for being who they are, becoming an employer in North Carolina, where members of our teams will not have equal rights under the law, is simply untenable,” Schulman said on Tuesday.

While PayPal seeks alternative locations for its operation center, it will also work with the LGBT community in North Carolina to overturn HB2.

PayPal is not the only employer to pull out of North Carolina. Lionsgate was planning to shoot a pilot for Crushed, a new Hulu show, in Charlotte. On Monday, the studio announced that it will now be shot in Vancouver, Canada.

Lionsgate, which is also filming the musical Dirty Dancing in North Carolina, called the law “deplorable and discriminatory”.

“We will be hard pressed to continue our relationship with North Carolina if this regressive law remains on the books,” Lionsgate said in a letter issued on behalf of the Dirty Dancing project.

The NBA is also considering possibly moving its 2017 all-star game outside North Carolina in the wake of the passage of HB2.

Cities like Charlotte implemented non-discrimination laws based entirely on business case – knowing that such laws would make them attractive to out-of-state businesses and investors, explained Jonathan D Lovitz, vice-president of external affairs at the National Gay and Lesbian Chamber of Commerce.

“North Carolina is about to get hit really hard with companies either losing out or business leaving in protest,” he warned, describing the bill as “ job killer”.

When asked about the potential impact of the bill on the state’s economy and job market, the North Carolina Department of Labor said that it is “charged with promoting the health, safety and general wellbeing of working North Carolinians. We do not track or monitor economic trends nor do we track employment statistics.”

When pushed on whether the bill was harmful to the safety of LGBT workers in the state, the Department of Labor spokeswoman, Dolores Quesenberry, would only say: “To the best of our understanding, no provision of HB2 changes the Department of Labor’s authority under any laws we are charged with enforcing.”