Gov. Pat McCrory of North Carolina at an event in Raleigh on May 4. AP Photo/Gerry Broome North Carolina's controversial "bathroom law" has cost it another major business expansion.

The real-estate research firm CoStar chose Richmond, Virginia, as the site of a 730-job expansion, passing over Charlotte, North Carolina, earlier this week. The law, which critics say is anti-LGBT, played a deciding role in the firm's decision, the Charlotte Business Journal reported this week.

Charlotte will miss out on an $8.2 million initial investment from CoStar, the Journal reported. The company also said it expected to invest $250 million in the local economy.

"We will affirm LGBT rights and the rights of every one of our employees and those in the community are a very high priority and core to our firm's values," CoStar said in a statement provided to The Charlotte Observer.

The firm chose Richmond over Charlotte even though North Carolina offered more than double the incentives, The Observer reported Thursday.

For North Carolina, the loss is another case of financial fallout from the law known as HB2. The Republican-backed law prevents cities from protecting LGBT residents with antidiscrimination laws. It also mandates that people use the public bathroom corresponding with their biological sex and not their gender identity.

Last month, Wired pegged the state's losses from businesses that have taken a public stance against the law at about $400 million. The law has cost Charlotte the 2017 NBA All-Star Game, more than a dozen collegiate championship events, concerts from high-profile musicians, and multiple major business expansions, including one from PayPal that would have created 400 jobs in Charlotte.

North Carolina's commerce secretary, John Skvarla, who was appointed by Gov. Pat McCrory, dismissed the idea that North Carolina was suffering because of the law.

"PayPal wasn't even a grain of sand on the beach," Skvarla told The Observer, adding that HB2 hadn't affected the state economy "one iota."

McCrory, a Republican who is up for reelection in November, is staking his political career on the law. The governor has staunchly defended it, and one pollster called HB2 the "driving factor" in the tight race between McCrory and Democrat Roy Cooper. The Democrat holds a slim lead over McCrory, according to a RealClearPolitics average of recent surveys.