The Trump administration told a U.S. appeals court that federal law does not ban discrimination against gay employees, a sharp reversal of the position former President Barack Obama took on a key civil rights issue.

The U.S. Department of Justice, in a friend of the court brief, told the 2nd U.S. Circuit Court of Appeals in Manhattan on Wednesday that Congress never intended Title VII, which bans sex discrimination in the workplace, to apply to gay workers.

The department also said the court owed no deference to the U.S. Equal Employment Opportunity Commission, a federal agency that enforces Title VII and has argued since 2012 that the law bans discrimination on the basis of sexual orientation.