Wavebreakmedia Ltd via Getty Images Broad corporate coalitions have quashed legislation in Arizona, Arkansas, Indiana and Georgia that discriminated against lesbian, gay, bisexual and transgender people. Now, they're taking a stand in North Carolina and Mississippi.

Corporate America has emerged as a powerful ally in the fight against a series of bills that threaten to roll back strides made toward LGBT equality.

Support has grown rapidly since 2008, when just five businesses came out to oppose California's Prop 8 referendum that overturned marriage equality in the state. Last year, ahead of the Supreme Court’s ruling that led to federal recognition of same-sex marriages, nearly 400 companies signed a friend-of-the-court brief on behalf of the plaintiff.

In it, they argued that “allowing same-sex couples to marry improves employee morale and productivity, reduces uncertainty, and removes the wasteful administrative burdens imposed by the current disparity of state law treatment.”

Over the past year, broad corporate coalitions have quashed legislation in Arizona, Arkansas, Indiana and Georgia that discriminated against lesbian, gay, bisexual and transgender people.

The fight has recently turned to North Carolina and, to a lesser extent, Mississippi, both of which have passed anti-LGBT legislation in the past few weeks. In both states, groups of businesses signed letters publicly denouncing the laws and affirming their support for legal protections against discrimination for LGBT people.

In North Carolina, some companies even went on something of an economic strike against the state. In early April, PayPal scrapped plans to build a new 400-employee outpost in Charlotte and Deutsche Bank announced it would not follow through with a planned 250-employee expansion of its office near Raleigh. Both companies cited North Carolina’s new law.

North Carolina Gov. Pat McCrory (R) responded to criticism of the law on Tuesday when he issued an executive order to clarified it. It expanded the non-discrimination policy for state employees to cover sexual orientation and gender identity, but otherwise reaffirmed the provisions of the law passed in March, allowing the private sector and local governments to set their own discrimination policies.

Corporations have yet to comment on the order. PayPal has not yet responded to inquiries from The Huffington Post and Deutsche Bank declined to comment.

Kent Smith via Getty Images North Carolina Gov. Pat McCrory (R) believes there’s “selective outrage” over the state's new law, which discriminates against the LGBT community.

Many of the corporate actions over the past few months stemmed from the work of Human Rights Campaign, an LGBT advocacy group known for its equal-sign logo, which went viral on social media in 2013 as a marriage equality symbol during the Supreme Court hearing of the California Prop 8 case.

HRC has been looking to galvanize corporate leadership in support of LGBT rights for more than a decade. It has published an annual corporate equality index since 2002. HRC rates companies on LGBT equality using a scale of 0-100. In its first report, only 13 companies received a perfect score. In 2016, 407 companies achieved this.

Anti-LGBT laws like those passed in North Carolina and Mississippi are “not only wrong, but they are bad for business,” said Deena Fidas, who leads the Corporate Equality Index for HRC. “States that have the stain of discrimination are not the most economically viable.”

And so it makes sense that corporations are increasingly advocating for LGBT rights in the workplace.

“There’s a frustration I’m sensing from companies about going from whack-a-mole to whack-a-mole here,” said Bob Witeck, a communications strategist on LGBT issues in Washington, D.C. “This is leading us to a tipping point. The tipping point is coming, and the tipping point is when businesses will be major movers in passing federal nondiscrimination legislation.”

Witeck said pretty soon they’re going to get fed up and demand that lesbian, gay, bisexual and transgender people receive the same legal protections against workplace discrimination afforded to cisgender women and people of color. Only 22 states and Washington, D.C. -- less than half the country -- have nondiscrimination laws to protect gay people from losing their jobs or homes because of bigoted bosses or landlords. Three of those don’t cover trans people.

Big business didn’t become a major ally in the LGBT rights movement out of principle alone. The upper echelon of corporate America remains a starkly straight and cisgendered place, with only one openly gay Fortune 500 chief executive, Apple’s Tim Cook. Former BP CEO John Browne resigned in 2007 after being outed as gay. But -- as companies jockey for talent and the combined buying power of lesbian, gay, bisexual and transgender adults in the U.S. hits $884 billion -- fighting on behalf of LGBT employees and stakeholders has logically become good business. This is especially true when talking about young talent: nearly three-quarters of millennials support same sex marriage, and acceptance of LGBT rights have increased with each new generation entering the workforce.

The country is becoming more accepting of the idea that LGBT rights are human rights, and business leaders have taken note of that shift.

Even as state laws emerge denying protection on the basis of sexual orientation and gender identity and a federal bill to protect against LGBT discrimination has stalled in Congress for years, it's becoming apparent that achieving equality is inevitable. Some federal agencies, such as the Equal Employment Opportunity Commission, have already said our current federal law is enough to protect against LGBT discrimination.

“We don’t want to be on the wrong side of history,” said Anthony Scaramucci, the founder of Skybridge Capital and SALT, the hedge fund conference in Las Vegas. The Republican political donor and his company are supporters of LGBT rights. Caitlin Jenner will be a speaker at this year’s conference.

It seems relatively sudden, but the shift has been decades in the making for LGBT rights activists.

“If we go back to the early 1990s, that’s when we start to see corporations starting to listen more and have conversations internally related to LGBT issues,” said Lee Dadgett, an economics professor at the University of Massachusetts Amherst. “Businesses were the first institutions to recognize same-sex couples, it just took them a while to see that as also being relevant for public policy, not just internal policy.”

Witeck wrote in the short talking-points memo, The Extreme Right and the Libertarian/Fiscal Right are Different Creatures, in 2006 that advocates should embolden businesses “to speak out and publicly resist efforts to polarize society on political wedge issues by convincing them that inflaming culture wars are bad for business and distort their best economic interests.” Witeck urged clients to downplay marriage as a “fading, hot button issue.”

“Marriage at that time was sort of an exceptional issue, it was the radical edge of public policy,” he told HuffPost. “Everyone thought we’d at least first get employment discrimination laws.”

But momentum grew as state after state legalized same-sex marriage. Advocates say the turning point came in 2011, when marriage equality came to New York, the epicenter of finance and birthplace of the modern LGBT liberation movement.

“From that moment on, you saw many more corporate voices weighing in state by state as marriage fights went state to state,” Deena Fidas, who leads Human Rights Campaign’s Corporate Equality Index, told HuffPost.

Sign up for the HuffPost Must Reads newsletter. Each Sunday, we will bring you the best original reporting, longform writing and breaking news from the Huffington Post and around the web, plus behind-the-scenes looks at how it’s all made. Click here to sign up!