PayPal Holdings Inc. on Tuesday canceled plans to open a global operations center in Charlotte, North Carolina, and invest $3.6 million in the area after the state passed a controversial law targeting lesbian, gay, bisexual and transgender citizens.

The digital payment company's protest is the first by a major business after North Carolina became the first state last month to enact a measure requiring people to use bathrooms or locker rooms in schools and other public facilities that match the gender on their birth certificate rather than their gender identity.

RELATED: Does this PayPal commercial spill the beans about Santa Claus?

The law, which overturned a Charlotte city ordinance, was widely interpreted as an attack on LGBT rights. State lawmakers also voted to prohibit local governments from enacting anti-discrimination protections based on sexual orientation and gender identity.

"The new law perpetuates discrimination and it violates the values and principles that are at the core of PayPal's mission and culture," Chief Executive Officer Dan Schulman said in a statement.

In a letter on March 29, founders and chief executives of more than a hundred companies, including Apple Inc., Twitter Inc. and Alphabet Inc. urged North Carolina Gov. Pat McCrory to repeal the legislation.

Earlier in March, the payment processor announced plans to open the operations center in Charlotte and employ 400 skilled workers there. It was set to invest more than $3.6 million in the Charlotte area by the end of 2017, according to a news release on the governor's website.

RELATED: PayPal hits offline milestone, but Wal-Mart holds out

After PayPal's decision, North Carolina Lieutenant Gov. Dan Forest, who like McCrory is a Republican, defended the law.

"If our action in keeping men out of women's bathrooms and showers protected the life of just one child or one woman from being molested or assaulted, then it was worth it," he said in a statement.

PayPal said it is now looking for another site for the center and has not yet made a decision on location.