WASHINGTON — President Obama plans to sign an executive order on Monday that protects gay, lesbian, bisexual and transgender employees from discrimination by companies that do federal government work, fulfilling a promise to a crucial Democratic constituency, White House officials said on Friday. But the directive will not exempt religious groups, as many of them had sought.

The order will also, for the first time, explicitly protect federal employees from discrimination on the basis of gender identity, officials said. Federal workers are already protected based on their sexual orientation.

Gay groups stepped up their already intense campaign to persuade Mr. Obama to sign the order after the Supreme Court’s decision last month in the Burwell v. Hobby Lobby Stores case. In that ruling, the court said that family-run corporations with religious objections could be exempted from providing employees with insurance coverage for contraception, and there were fears that the case would have repercussions for gay men, lesbians, bisexuals and transgender people.

“With the strokes of a pen, the president will have a very real and immediate impact on the lives of millions of L.G.B.T. people across the country,” Chad Griffin, the president of the Human Rights Campaign, said in a statement on Friday. “These actions from the president have the potential to be a keystone in the arch of his administration’s progress, and they send a powerful message to future administrations and to Congress that anti-L.G.B.T. discrimination must not be tolerated.”