CHARLOTTE, N.C. (AP) — Internal emails show that city and state officials blame a North Carolina law limiting LGBT protections for a company’s decision to pick another state for a new project that includes 700 jobs.

The Charlotte Observer reports that emails obtained through public records requests show that the law known as HB2 was cited as a key factor in CoStar Group’s decision not to put its hub in Charlotte.

One email to city officials says the real estate research firm’s CEO received pushback from his board over HB2 when they were deciding where to create a base for real-estate research operations. The company ultimately chose Richmond, Virginia, for the facility that will employ about 730 people.

Jeff Edge, a Charlotte Chamber of Commerce official who was recruiting the company, wrote that CoStar’s CEO was “broadsided with their pushback over the HB2 issue in Charlotte” when the CEO sought approval from his board to do final negotiations.

Edge says in the Sept. 20 email to a city economic development official that CoStar was rethinking Charlotte “due to all of the press and chatter over HB2 in the past week.” The email was written not long after the NCAA and ACC moved sporting events out of the state because of the law.

Edge wrote: “They have re-opened the competition to look more closely at Atlanta and Richmond now.”

Edge also added: “Heaven knows how many deals we’ve been crossed off … and didn’t know we were even being considered for since March.” HB2 was enacted in March.

A spokeswoman for CoStar said Friday that company officials wouldn’t comment on what role HB2 played in their decision.

Costar’s decision to build its hub in downtown Richmond was announced on Oct. 24 by Virginia’s governor. The company headquartered in Washington, D.C., is known for its Apartments.com website.

An Oct. 25 email from a North Carolina economic development official makes an apparent reference to HB2. The email was to state officials from Garrett Wyckoff, senior manager of business recruitment for the Economic Development Partnership of North Carolina.

“It is my understanding that we lost the project. I have selected the following reason for this status change: Local issues,” Wyckoff wrote in the email obtained by the Observer. For further explanation, Wyckoff added: “Spring 2016 Legislation,” a reference to when HB2 was passed.

Wyckoff said in an email that he couldn’t comment. Edge didn’t respond to a phone message seeking comment Friday.

HB2, enacted in March, requires transgender people to use restrooms corresponding with the sex on their birth certificate in many public buildings. It also excludes sexual orientation and gender identity from statewide anti-discrimination protections.

Other large companies including Deutsche Bank and PayPal said publicly they chose not to bring more jobs to North Carolina because of the law. Scores of other companies have signed a letter seeking its repeal or joined a legal filing asking a judge to rule against it.

The relocation of the NCAA and ACC events was estimated to deprive the state of tens of millions of dollars.

The law also had an impact on the governor’s race, which is still undecided. Currently, incumbent Republican Gov. Pat McCrory, who has defended the law, trails Democrat Roy Cooper, who opposed it, by thousands of votes.

© 2016, Associated Press, All Rights Reserved.

This material may not be published, broadcast, rewritten, or redistributed.