Rita Miljo, who founded a sanctuary in South Africa to care for injured and abandoned baboons and reintroduce them to the wild, died July 27 in a fire at her home in the province of Limpopo, about 250 miles northeast of Johannesburg. She was 81.

Karl Pierce, an official with Ms. Miljo’s organization, the Center for Animal Rehabilitation and Education (CARE), confirmed her death to the Associated Press.

The cause of the fire, which destroyed a clinic, house, offices and the apartment in which Ms. Miljo lived, is under investigation. Two baboons also died in the blaze.

The German-born Ms. Miljo (pronounced MILL-yoh) had lived in South Africa since 1953, but she didn’t rescue her first baboon until 1980. She was one of a series of women who moved to Africa to protect endangered primates, including Jane Goodall, who studies chimpanzees, and Dian Fossey, who worked with gorillas before she was murdered in Rwanda in 1985.

Baboons, with their elongated, doglike faces, do not have such obviously human features as other primates and were long considered pests in their native regions. When Ms. Miljo began working with baboons, it was unlawful in South Africa to rescue the animals or house them without a permit. She called them “nature’s unwanted little people.”

Rita Miljo founded a sanctuary for injured and orphaned baboons in South Africa, then returned the baboons to the wild. She died in a fire at her compound at age 81. (Courtesy of Michael Blumenthal )

She often appeared in court on charges of illegally transporting or harboring baboons. According to the book “Kalahari Dream” by Chris Mercer and Beverly Pervan, Ms. Miljo had a standard response that often disarmed the police and prosecutors: “Who are you to tell God that he should not have created baboons?”

In 1980, Ms. Miljo rescued an abandoned female baboon from a national park in Angola in defiance of local laws. She established CARE in 1989 on a 50-acre parcel of land in a remote region near South Africa’s Kruger National Park. Her organization receives no support from any government and survives on donations.

Ms. Miljo and a staff of volunteers took in baboons that had been rescued by good Samaritans or that had been orphaned when their mothers were killed, often for sport. Other baboons had been kept in cages for medical experiments or were held so their feces could be used in native medicines.

According to the CARE Web site, the private preserve houses about 600 baboons. They receive medical treatment and are blended into packs, or troops, of baboons of different ages. When they can manage on their own, the troops are reintroduced to the natural world.

Nelson Mandela, the former South African president and freedom fighter, once attended the release of one of Ms. Miljo’s troops into the wild.

In recent years, Ms. Miljo had stepped down as leader of CARE, but she remained its most visible international presence. She and her sanctuary were featured in 2004 in “Growing Up Baboon,” part of an Animal Planet television series about the lives of wild animals.

The baboons’ rehabilitation includes close human contact, and Ms. Miljo often kept infant baboons near her bed at night for warmth and comfort. When the babies were indoors, they wore diapers with holes cut out to accommodate their tails.

Rita Neumann was born in 1931, in Koenigsberg, a German city that is now part of Russia.

As a child, according to a 2008 article in The Washington Post magazine by freelance writer Michael Blumenthal, Ms. Miljo was a member of the Hitler Youth.

“There were lots and lots of sports and competition,” she said in the interview. “Only today, in hindsight, do I understand the total madness we were subjected to.”

After working at a zoo in Hamburg, she moved in 1953 to South Africa, where she married a German engineer, Lothar Simon. Her husband and 17-year-old daughter were killed in the crash of a small airplane in 1972. A later marriage to Piet Miljo ended in divorce. Her lone survivor is a brother who lives in Botswana.

Asked why she was drawn to care for baboons, Ms. Miljo told Blumenthal in the Post magazine article, “Chimpanzees can be deceitful, just like humans, whereas baboons haven’t learned that yet.”

From baboons, she said, “I learned how people tick. I learned why people behave the way they do.”