The job candidate interviewing to be a terrorism research analyst at the Library of Congress seemed to have exceptional qualifications: a 25-year Army veteran and former Special Forces commander who spent a career hunting terrorists and often personally briefed the vice president, defense secretary or Joint Chiefs of Staff on sensitive operations.

The interviews and salary talks went well for David Schroer. A job offer followed, and he accepted. Then the new employee brought up one last item: Once work began, the name would be Diane, not David.

The job offer, Schroer said, was rescinded the next day.

Schroer, 48, recently began the medical transition to become a woman. The former Army Ranger believed that the library would be a welcoming place to make a gender transition: "It's the United States government. It's the Congress. It's an eclectic, academic environment with a group of diverse people that all work together to get the job done."

Schroer is to file a lawsuit today accusing the Library of Congress of sex discrimination and asking that the job offer be reinstated, said Arthur B. Spitzer, legal director of the American Civil Liberties Union of the National Capital Area.

"This is an important case, factually, because here's a person who spent her entire career defending freedom for the entire country and is now being told she is unfit for a job with the government," said Spitzer, who represents Schroer.

Spitzer said the case could face some obstacles. "Legal protection for transgender people is not at all clear. . . . Courts have not been as receptive as they need to be for providing discrimination protection for these people," he said.

A spokeswoman for the library, Helen Dalrymple, declined to comment on any details of Schroer's complaint because the case is a personnel matter.

David Schroer began the transition to Diane about 18 months ago, after knowing for years that as a man, he was uncomfortable in his own skin. "I always wondered why I couldn't play with the girls, why I couldn't dress like a girl. I always felt I was in the wrong queue," Schroer said.

After a 16-year marriage and high-octane career that included 450 parachute jumps, midnight special operations missions abroad, a number of medals for distinguished service and two master's degrees, Schroer began some quiet research into the gender identity issues that have been present for years.

"It was an epiphany for me," the retired colonel said.

Leaving the Army last year was the beginning of that transformation, and Schroer began working for a small consulting firm run by former "special ops folks."

After months of psychotherapy, Schroer decided to proceed with the full course of medical treatment for people with gender identity disorder, a medical condition in which a person's gender identity conflicts with anatomical sex at birth.

Schroer began a job search that led last fall to the Library of Congress, which had an opening for a terrorism research analyst. Schroer said officials were thrilled when an applicant offered an operational background, rather than merely an academic one.

Interviewing as David, Schroer beat out 18 contenders and got all the way to discussions of salary and start date. Then Schroer asked the future supervisor out for lunch.

The supervisor, Schroer said, talked about the office and introduced David Schroer as the new researcher. At lunch, Schroer told her that the person coming to work would be Diane.

Schroer tried to make the supervisor more comfortable, explaining the surgeries and showing her pictures of Diane in a dress. "No one wants to go through life being the punch line of a joke. I'm not going to do this if I'm going to look like a truck driver in a dress. I wanted her to see I looked good, professional," Schroer said.

But the next day, Schroer said, the supervisor called and withdrew the offer.

"I felt cheated and kind of hurt, honestly," said Schroer, who called the ACLU the next day.

The supervisor did not return a message left on her home phone, asking for her side of the story.

"When you get called into Panama on the 19th of December, a week before Christmas, after a midnight phone call, and you do this kind of stuff as part of your job for years and years, and suddenly you're told that now you're not good enough to work for the government, that's not right," Schroer said.

Schroer's resume describes David's role in creating and commanding a classified, 120-person organization that tracked terrorist groups around the world, often reporting directly to Vice President Cheney. Even so, Schroer as Diane is struggling to find a full-time job.

Given the chance to file the suit as an anonymous "Jane Doe," Schroer chose to file it as Diane Schroer, "to avoid hiding."

After he accepted a job at the Library of Congress, David Schroer told his prospective boss that once he started work, he would be Diane, not David. The job offer was withdrawn, Schroer said. "I felt cheated and kind of hurt."

David Schroer in 1985, as a commander in the 2nd Armored Cavalry Regiment, East, at the West German border. His career included 450 parachute jumps and midnight special operations missions.Diane Schroer at a San Francisco hospital in February after "facial feminization surgery." "I'm not going to do this if I'm going to look like a truck driver in a dress," Schroer said.