Jerrie Cobb was as qualified as any man to be an astronaut.

A seasoned pilot, she held world records for speed, altitude and distance. She had undergone rigorous physical and psychological examinations and emerged in the top 2 percent of all those — mostly men — who were tested.

But in 1961, as she seemed on the verge of becoming the nation’s first female astronaut, the door was slammed shut.

“Right Stuff, Wrong Sex” was the title of a 2005 book about her plight and that of a dozen other women, all pilots, who had also passed the required tests but were barred from the elite astronaut corps.

Ms. Cobb, who died on March 18 at her home in Florida at 88, would fight her exclusion for years to come.