The American Civil Liberties Union (ACLU) has criticized the position of the Trump administration in a Supreme Court brief, saying that its filing has been “reverse engineered” to conclude that it's lawful to fire LGBT workers.

The 34-page brief submitted Friday was signed by U.S. Solicitor General Noel Francisco.

Francisco argues in the filing that Title VII's protections based on sex do not extend to people who identify as lesbian, gay, bisexual or transgender because Congress in 1964 didn't intend to ban such discrimination and lawmakers have failed to enact legislation such as the Equality Act which would explicitly do so.

“The question here is not whether Title VII should forbid employment discrimination because of sexual orientation, but whether it already does,” the brief states. “The statute’s plain text makes clear that it does not; discrimination because of ‘sex’ forbids treating members of one sex worse than similarly situated members of the other – and discrimination on the basis of sexual orientation, standing alone, does not result in such treatment.”

“Congress has amended other statutes expressly to cover sexual-orientation discrimination, and it remains free to do the same with Title VII. But until it does, this Court should enforce the statute as it is written.”

(Related: Jerold Nadler calls for passage of Equality Act in response to Trump's plan to “gut” LGBT order.)

The Supreme Court will hear arguments in October in two cases involving workers who lost their jobs because of their sexual orientation.

Criticizing the government's position is Ria Tabacco Mar, senior staff attorney for the ACLU, who said that the administration's brief “defies logic and common sense.”

“They admit it is unlawful to fire gay men or lesbians, but claim it is perfectly fine to fire gay men and lesbians,” Mar said. “And they concede that employers may not penalize workers based on ‘gender norms,’ yet assert that discriminating based on moral beliefs about sexual or marital relationships has ‘nothing to do with’ gender norms.”

“It is simply reverse engineered to reach the result the Trump administration wants: An America where it is perfectly lawful to fire workers because they are lesbian, gay, or bisexual or transgender,” Mar added.

In a Supreme Court brief filed last week, the administration held a similar position in a case involving an employee who was fired because of her gender identity.

(Related: In Supreme Court brief, Trump admin argues it's OK to fire transgender workers.)