President Obama should resist a pressure campaign by some religious groups to weaken a promised executive order that would prohibit federal contractors from discriminating against gay men, lesbians and transgender people in their hiring practices.

Emboldened by the Supreme Court’s addlebrained Hobby Lobby decision, several groups wrote to Mr. Obama on July 1 asking him to allow federal contractors to fire or refuse to hire workers based on their religious objections to a person’s sexual orientation or gender identity.

This is not a question of religious freedom. It is a question of whether to allow religion to be used as an excuse to discriminate in employment against a particular group of people. Many states already have laws protecting gay, lesbian, bisexual and transgender workers. There is no such federal law, so the presidential order (promised but not yet produced) would extend those rules to companies that receive federal contracts in states without those kinds of anti-bias laws, protecting millions more people.

Mr. Obama’s resolve is being tested. There is no good reason to give religious employers a special privilege to inflict undeserved pain by, for example, refusing to hire someone to work on a government-backed project just because she happens to be a lesbian, or firing a capable employee who marries someone of the same sex.