A California congressman has lost the endorsement of a 1.3 million-member Realtors group after saying it was acceptable for people to refuse to sell their homes to gay men and lesbians if “they don’t agree with their lifestyle.”

Rep. Dana Rohrabacher (R-Calif.) made the controversial comments May 16, during a meeting with a delegation from the National Association of Realtors, the Orange County Register first reported Thursday.

“Every homeowner should be able to make a decision not to sell their home to someone [if] they don’t agree with their lifestyle,” Rohrabacher said, according to Wayne Woodyard, a former president of the Orange County Association of Realtors.

Woodyard said the meeting included proposing a change to the Fair Housing Act to extend anti-discrimination protections to LGBT groups.

“I told the congressman that we need to add federal protections for the LGBTQ community as the final piece of the Fair Housing Act, and the minute I stopped speaking, he said, ‘I just will not support that,’ ” Woodyard told CNN.

Rohrabacher himself confirmed to the Register that he had made those statements.

“We’ve drawn a line on racism, but I don’t think we should extend that line,” Rohrabacher told the newspaper. “A homeowner should not be required to be in business with someone they think is doing something that is immoral.”

The congressman’s remarks prompted outrage online, including from prominent LGBT rights groups, and ultimately prompted the Realtors association to drop its support of him.

In a statement, NAR President Elizabeth Mendenhall said the group “carefully considers many criteria before supporting candidates” and that its President’s Circle — an exclusive and influential group within NAR that donates directly to “Realtor-friendly candidates” — would no longer be supporting Rohrabacher.

“Making this decision was the right thing for NAR to do; the association’s member Code of Ethics is far ahead of Congress on gender identity and sexual orientation discrimination,” Mendenhall said. “We certainly hope that Congress will follow the lead set at our recent legislative meetings and support the elimination of housing discrimination based on sexual orientation or gender identity.”

The NAR’s President’s Circle is different from its Realtors Political Action Committee, which takes voluntary contributions from members and donates them to candidates “who understand and support [Realtors’] interests,” the NAR states on its website. The President’s Circle allows Realtors to contribute in excess of the limit for political action committees.

“The legal limit any PAC can invest in a Member of Congress is $10,000 per cycle,” a Realtors page explaining the President’s Circle states. “The President’s Circle program allows Realtors to invest beyond RPAC dollars and capture the attention of Capitol Hill.”

When asked if the Realtors PAC — not just the President’s Circle — would also be dropping its support of Rohrbacher, an NAR representative declined to answer.

“Our statement is all we are sharing on this right now,” NAR spokeswoman Sara Wiskerchen told The Washington Post in an email Saturday.

The Fair Housing Act prohibits housing discrimination based on “race, color, national origin, religion, sex, disability and familial status.” It does not, however, specifically include sexual orientation and gender identity, though anti-LGBT discrimination may still be covered in certain cases, according to the U.S. Department of Housing and Urban Development.

A federal judge last year ruled that the Fair Housing Act protects LGBT couples, but proposed bill HR 1447 would amend the law to add sexual orientation and gender identity as protected classes.

Rohrabacher, a former speechwriter for President Ronald Reagan, represents California’s 48th District, which includes Orange County and which Ballotpedia has rated as “safely Republican.” He is serving in his 15th term while campaigning for reelection this year. In June, Rohrabacher will face four Republicans in the primary. Several other Democratic candidates are also hoping to unseat the longtime lawmaker.

“It certainly can’t do me any good to have people take me off their endorsement list,” Rohrabacher told the Orange County Register, of NAR’s decision to drop its support of him. “It’s sad to see [the NAR’s] priority is standing in solidarity with making sure a stamp of approval is put on somebody’s private lifestyle.”

His campaign spokesman, Greg Blair, doubled down on Rohrabacher’s remarks in an email to The Post, casting it as an issue of religious freedom.

“Congressman Rohrabacher does not believe the federal government should force those with strong religious convictions into a personal or business relationship that is contrary to their religion,” Blair wrote.

Harley Rouda, one of the Democratic candidates for the 48th District congressional seat, denounced Rohrabacher’s comments.

“In the face of a losing battle Dana has decided to attack those vulnerable among us,” Rouda tweeted Friday. “Rohrabacher’s ideas do not reflect who we are as constituents in #CA48. We fight for the Rights of all people.”

Eli Rosenberg contributed to this report. This post has been updated.

Read more: