In the spring of 1969, she returned to Nairobi to continue her studies at the University College of Nairobi as an assistant lecturer. In May, she and Mwangi Mathai were married.[20] Later that year, she became pregnant with her first child, and her husband campaigned for a seat in Parliament, narrowly losing. During the course of the election, Tom Mboya, who had been instrumental in founding the program which sent her overseas, was assassinated. This led to President Kenyatta effectually ending multi-party democracy in Kenya. Shortly afterward, her first son, Waweru, was born.[21]
In 1971, she became the first Eastern African woman to receive a Ph.D., when she was granted a Doctorate of Anatomy[14] from the University College of Nairobi, which became the University of Nairobi the following year. She completed her dissertation on the development and differentiation of gonads in bovines.[22] Her daughter, Wanjira, was born in December 1971. She continued to teach at the university, becoming a senior lecturer in Anatomy in 1974, chair of the Department of Veterinary Anatomy in 1976 and associate professor in 1977. She was the first woman appointed to any of these positions in Nairobi.[1] During this time, she campaigned for equal benefits for the women working on the staff of the university, going so far as to attempt to turn the academic staff association of the university into a union, in order to negotiate for benefits. The courts denied this bid, but many of her demands for equal benefits were later met.