Rep. Dana Rohrabacher, R-Calif., ignited controversy this past week after suggesting that homeowners should be free to refuse to sell homes to LGBTQ people.

Rohrabacher initially made the remarks last week while speaking to a group of National Association of Realtors members who had congregated in his office. Members of the group were there to ask Rohrabacher to support HR 1447, a bill that would add sexual orientation and gender identity to the list of classes protected against discrimination in the Fair Housing Act (FHA) under the Civil Rights Act of 1968.

“I presented the Fair Housing Act to him along with [information on HR 1447],” Wayne Woodyard, one of the NAR members in the room, told NBC News. “Almost before I could finish, he let out, ‘I will not support it.’”

“There were about 10 people in his office, and we were all kind of shocked,” he added. Woodyard said after Rohrabacher’s initial response, one of his former staffers interceded and said, “Well, Dana, I don’t think you understand,” to which the Congressman said, according to Woodyard, “No, I do understand.”

Woodyard said he and other NAR members “tried to change his opinion” the following evening at a private lobbying dinner, but the Congressman “wouldn’t have it.”

In an email to NBC News, a spokesperson for Rohrabacher confirmed the lawmaker’s stance on the issue.

"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,” the spokesperson stated.

The NAR has since withdrawn its endorsement of Rohrabacher, who is up for re-election in November.

While there is currently no federal law that explicitly protects LGBTQ people from housing discrimination, 20 states and D.C. prohibit discrimination based on sexual orientation and gender identity, and Wisconsin and New Hampshire prohibit discrimination based on sexual orientation, according to the Human Rights Campaign.

“This is blatantly, explicitly illegal in the state of California,” explained Karen Loewy, senior counsel at Lambda Legal, noting California is among the 20 states.“It is really beyond the pale for an elected official to actively encourage illegal discrimination against LGBT people.”

While nothing could prevent an individual from privately choosing not to sell their home to someone else for personal reasons, California’s housing laws make it illegal to explicitly discriminate against someone due to their sexual orientation or gender identity. For example, a home seller in California wouldn’t legally be able to include “Same-sex couples need not apply” on their housing ad. A home seller in Alabama, however, may be able to do so.

Loewy, however, said even in some states that do not explicitly protect LGBTQ people from housing discrimination, a number of courts have ruled discrimination based on sexual orientation or gender identity is illegal “sex” discrimination under the Fair Housing Act, which protects against “discrimination on the basis of race, color, religion, sex, handicap, familial status, or national origin.”

Woodyard added that the Realtor code of ethics also prohibits agents from discriminating against LGBTQ people in home sales.

“A realtor can be sanctioned or lose their license for discriminating,” he said.

FOLLOW NBC OUT ON TWITTER, FACEBOOK AND INSTAGRAM