A former Army Special Forces commander who was rejected from a job because she was undergoing gender reassigment has won her case for sexual discrimination.

Diane Schroer of Alexandria, was awarded $491,190 (£330,653) by US District Judge James Robinson this week.

She had been offered a terrorism analyst job at the Library of Congress when she was known as David Schroer but the offer was withdrawn when she told her would-be boss about her upcoming gender reassignment surgery

The American Civil Liberties Union, which had argued Schroer’s case for her, had said the ruling was significant because the federal judge had recognised that discrimination for changing gender was sex discrimination.

The Library of Congress and the Justice Department had argued that discrimination due to trans status was not illegal sex discrimination under the Civil Rights Act.

The Justice Department has not yet confirmed it will appeal.

In a statement, Schroer said: “I served our country because I believe in an America that is committed to ensuring everyone has an equal opportunity to have a meaningful life.

“That belief was shaken when I was told I wasn’t worthy to do what I trained my entire life to do because I happen to be transgender.

Today’s decision restores my faith in our democracy. The court understood the senseless harm that is caused by discrimination, and that gives me hope that others will also.”