The U.S. Senate passed legislation that would prohibit most employers from firing, demoting or refusing to hire workers because of their sexual orientation or gender identity.

The bill, known as the Employment Non-Discrimination Act, or ENDA, would extend workplace protections to lesbian, gay, bisexual and transgender individuals. The vote, which required only a simple majority for passage, was 64-32.

“This issue of freedom from discrimination is a core issue of freedom,” the bill’s sponsor, Oregon Democrat Jeff Merkley, said on the Senate floor. The legislation “will make a difference in millions of lives, and it will make a difference in the strength and character of our nation,” he said.

The bill’s future is less certain in the Republican-controlled House, where Speaker John Boehner of Ohio has expressed opposition to the measure. A similar House bill introduced in April has only five Republican co-sponsors, compared with 188 Democratic co-sponsors.

While the Senate bill carves out exemptions for religious organizations, entities that aren’t primarily religious in purpose would have to comply.

Some Republicans said the religious exemptions weren’t broad enough, prompting Senate leaders to agree to a vote earlier today on an amendment that would have expanded the definition of religious groups to provide for more exemptions from the bill’s provisions, including for religiously chartered hospitals. That amendment, which under the agreement needed 60 votes for adoption, failed by a vote of 43-55.

‘Moral’ Beliefs

“The so-called protections for religious liberty in this bill are vaguely defined and do not extend to all organizations that wish to adhere to their moral or religious beliefs in their hiring practices,” Indiana Republican Dan Coats said today on the Senate floor.

“We must strive to reach the appropriate balance between protecting workers and protecting religious freedom,” said the amendment’s author, Senator Pat Toomey, a Pennsylvania Republican.

Toomey’s amendment was opposed by some of the bill’s backers, including the Human Rights Campaign, a Washington-based gay-rights advocacy group.