President Barack Obama plans to sign an executive order barring federal contractors from discriminating against employees on the basis of sexual orientation, a White House official said Monday.

The move follows years of pressure from gay rights groups for Obama to act on his own while a broader employment nondiscrimination measure languishes on Capitol Hill. The Senate passed the legislation last year, but the bill stalled in the Republican-led House, and there is little sign that lawmakers will take it up in an election year.

The official would not say when Obama planned to sign the order, only that the he had asked his staff to prepare a measure for his signature. The official insisted on anonymity, lacking authorization to publicly discuss the president's decision.

There is no federal law that bans workplace discrimination on the basis of sexual orientation or gender identity. While Obama does not have the authority to extend that protection to all Americans, he can take unilateral action that involves federal contractors. Federal contractors employ about a quarter of the U.S. workforce.

"We're thrilled that the White House is finally taking action on LGBT workplace discrimination," said Heather Cronk, a co-director of GetEqual, an organization that backs rights for lesbian, gay, bisexual and transgender people. "It is now vitally important for all of us to insist that this executive order, when eventually signed by the president, does not include religious exemptions that would permit taxpayer dollars to be spent on discrimination."

Currently, employment laws do not apply to religious employers because of a 2012 Supreme Court decision that held that the First Amendment requires a “ministerial exception” for religious institutions.

Obama has used the executive order tactic before, signing orders that raise the minimum wage for federal contractors and expand the number of workers eligible for overtime pay. White House officials have cast the approach as part of the president's effort to work around Congress, which continues to be gridlocked.

The Associated Press. Amel Ahmed contributed to this report.