An alumna of Los Alamos, she became a chemistry professor and urged universities to recruit more women as students, professors and administrators.

Dr. Lilli Hornig, who rejected a male chauvinistic job offer to type other scientists’ top secret reports during World War II and instead found her way to produce research that helped trigger the first atomic bomb, died on Friday in Providence, R.I. She was 96.

The cause was heart and lung failure, her daughter Joanna Hornig Fox said.

Dr. Hornig was in her early 20s in 1944 when, armed with a graduate degree in chemistry, she was offered the secretarial position at a secret atomic laboratory in Los Alamos, N.M., part of the government’s Manhattan Project. Her husband had been hired as an explosives expert there.

The slight proved frustrating and fateful. Later, after receiving a doctorate from Harvard, she went on to dedicate her career in academia to championing women in science, mentoring younger women and advocating for major research universities to recruit more women as science students, professors and administrators. She also wrote or edited three books on women in science and higher education.

Dr. Hornig and her husband, Donald Hornig — he would later be a science adviser to President Lyndon B. Johnson and the president of Brown University in Providence — had made their way to New Mexico in a 1937 Ford couple after he was recruited by a fellow scientist, George B. Kistiakowsky.

“Don, of course, went straight to work,” Dr. Hornig remembered, “and I went to the personnel office. And the first question was, ‘How fast can you type?’ ”

She couldn’t type at all.

“She had a master’s degree in chemistry from Harvard,” Ruth H. Howes and Caroline L. Herzenberg wrote in “Their Day in the Sun: Women of the Manhattan Project” (1999), “but typing had not been one of the requirements.”

Dr. Hornig talked her way into researching plutonium with another woman hired by the project. But when her supervisors realized that the isotope they were working with was so radioactive that it might jeopardize the women’s fertility, she was reassigned to experiment with conventional explosives, joining her husband’s department.

The Hornigs experimented with separate aspects involved in detonating the explosive charges that would implode the bomb’s plutonium core and release unprecedented destructive energy, as the world would witness when the United States dropped atomic bombs on the Japanese cities of Hiroshima and Nagasaki in 1945, ending the war.

During her research she encountered Klaus Fuchs, a German-born British scientist, and David Greenglass, a United States Army machinist, both of whom were later unmasked as Soviet spies.

“We had a weekly section meeting where we reported little bits of information, and Klaus Fuchs came to every one of those,” Dr. Hornig said in an oral history interview in 2011 for the Atomic Heritage Foundation. “I always wondered why.”

She said he had been “a very silent man.”

“I don’t recall him ever asking a question,” she said, “but he took notes all along, and so between him and Greenglass, I probably contributed some information unwittingly.”

Lilli Schwenk was born into a Jewish family on March 22, 1921, in Aussig, in the Sudetenland, which was then part of Czechoslovakia. (It is now called Usti Nad Laben and is in the Czech Republic, near the German border.) They later moved to Berlin.

Her father, Erwin, was an organic chemist who worked for the pharmaceutical division of Schering-Kahlbaum, a Berlin-based company that, among other products, synthesized estrogen, the female sex hormone. (It is now Bayer Schering Pharma.) Her mother, the former Rascha Shapiro, was a pediatrician.

In Berlin, as the Nazis gained power, Erwin Schwenk, as a Jew, faced imprisonment and fled the country. The rest of the family soon followed and settled in Montclair, N.J.

“My father took me occasionally — very occasionally — on a Sunday to his lab, and I just loved all the glassware, and he gave me some micro-sized glassware for my dollhouse,” Dr. Hornig recalled in the oral history interview.

She added, “I always assumed I would — well, they assumed — that I would be either a chemist or a physician, and I was kind of squeamish at the time, so I went for chemistry.”

She earned a bachelor’s degree in chemistry from Bryn Mawr College in Pennsylvania in 1942 and a master’s in chemistry from Harvard in 1943, the same year she married Donald Hornig, a doctoral student.

After earning her own doctorate at Harvard in 1950, Dr. Hornig became chairwoman of the chemistry department at Trinity, a women’s college in Washington (now Trinity Washington University). She later founded Higher Education Resource Services, a training institute at Brown. It subsequently moved to Wellesley College in Massachusetts.

The institute, known as HERS, researches discrimination against women historically and supports them by challenging sexism in hiring. The institute has found that the bias persists even though women outnumber men in colleges and universities and are being granted more advanced degrees in various disciplines than men.

Dr. Hornig was also the first director of the Committee on the Education and Employment of Women in Science and Engineering at the National Academy of Sciences, and served on the Committee for the Equality of Women at Harvard.

Women are underrepresented among young scientists with doctorates and higher-education teachers on a tenure track, Dr. Hornig wrote in a letter to The New York Times in 1984, “because the hiring and promotion practices of many distinguished universities are biased against them.”

They have been marginalized professionally and are paid less than men, she wrote.

In addition to her daughter Joanna, Dr. Hornig is survived by another daughter, Ellen Hornig; a son, Chris; 9 grandchildren; and 13 great-grandchildren.

Donald Hornig died in 2013. He worked under President Johnson from 1964 to 1969, conferring with him on space missions and atom smashers. As president of Brown, from 1970 to 1976, he established a four-year medical school and oversaw the merger of Pembroke College, Brown’s women’s school, with Brown College, the men’s undergraduate school.

In the oral history interview, Dr. Hornig recalled that her husband had babysat the first atomic bomb overnight before it was tested at dawn in the desert at Alamogordo on July 16, 1945. He was the last person to see the weapon before its detonation changed human history.

Meanwhile, Dr. Lilli Hornig joined Los Alamos colleagues 110 miles away in the Sandia Mountains as eyewitnesses to whether the weapon would work.

It also produced, in her, mixed emotions. Dr. Hornig signed a petition urging that a prototype be demonstrated to the Japanese before the bomb was dropped on Hiroshima.

“But big boys like big toys,” she told The Providence Journal in 2015. “I don’t think the Army even considered that request.”

Those ambivalent feelings were revived when she saw photographs of Hiroshima and Nagasaki after they had been leveled. On one hand there was a sense of “some triumph,” she said, “and the destruction was just so incredible.”

But, she added, “I think we’ve all been a little haunted by that over the years.”

The Atomic Heritage Foundation estimates that only about a dozen of the 1,500 or so scientists who worked at Los Alamos are still living.