An effort to repeal a non-discrimination ordinance in the town of Pocatello, Idaho was defeated on Tuesday.

Voters narrowly voted to keep the ordinance, approved by city leaders last year. According to NBC affiliate KPVI, supporters eked out a victory with 50.4 percent of the vote.

The ordinance prohibits discrimination based on sexual orientation and gender identity in the areas of employment and housing.

While state laws do not protect LGBT people, seven cities – Boise, Coeur d'Alene, Ketchum, Moscow, Sandpoint, Idaho Falls and Pocatello – have approved such laws.

Pocatello approved the measure in June after a contentious debate.

Opponents collected over 1,600 signatures to put the law up for a vote.

MSNBC called the tactics used by the opposition website StandUpPocatello.com “underhanded.”

The group's website emphasizes that opponents “do not condone any mistreatment of the LGBT community,” while suggesting the ordinance harms women and children, is bad for families and business and hampers religious freedom.