Wangari Maathai, 71, the Nobel Peace Prize winner who sparked an international movement for women’s rights and environmental preservation by teaching poor Kenyan women to plant trees, died Sept. 25 in a Nairobi hospital.

She had cancer, the Associated Press reported.

Dr. Maathai became the first African woman to receive the award when the Nobel committee honored her in 2004 “for her contribution to sustainable development, democracy and peace.”

In 1977, she founded the Green Belt Movement, a nongovernmental organization that married the two causes at the center of her work: women’s equality and stewardship of the land in her native Kenya.

By training rural women to plant trees, she hoped to give them greater control over their lives. Among other uses, the wood would serve as fuel for cooking fires. For each tree that survived outside the nursery, planters earned a few cents and a measure of economic independence.

At the same time, the women would help halt the deforestation and resulting erosion that was stripping bare entire swaths of Africa. More trees would lead to better soil, which in turn would allow greater crop cultivation and better nutrition.

Few people took her and her collaborators seriously.

“Well, that is typical,” Dr. Maathai told the Los Angeles Times in 1989. “First of all, we are women.”

To date, 40 million trees — figs, cedars, acacias, baobabs and more — have been planted across Africa, according to the Green Belt Movement Web site. Dr. Maathai’s work inspired the United Nations Billion Tree Campaign, which has planted more than 11 billion trees since 2006.

“The work of the Green Belt Movement stands as a testament to the power of grassroots organizing, proof that one person’s simple idea — that a community should come together to plant trees — can make a difference, first in one village, then in one nation, and now across Africa,” President Obama said Monday in a statement.

Known as “Kenya’s green militant,” Dr. Maathai pursued peace in a roundabout way.

“When our resources become scarce, we fight over them,” she told a Norwegian television station near the time of her award. “In managing our resources and in sustainable development, we plant the seeds of peace.”

She was jailed and severely beaten numerous times for her outspoken defense of her causes. Former Kenyan president Daniel arap Moi called her a “mad woman” and “a threat to the order and security of the country.” She challenged him, and won, in a high-profile battle over a proposed skyscraper and statue of the autocratic leader in a Nairobi park.

After Moi stepped down, Dr. Maathai served for several years in the Kenyan parliament, including as deputy minister for the environment, before losing her seat.

She survived over the years, she once told The Washington Post, by having “the thick skin of an elephant.”

Wangari Muta Maathai was born in Nyeri, a village in the highlands of Kenya, on April 1, 1940. She often spoke about the brook where she drew water as a girl. Over the years, that stream dried up, forcing women to walk long distances for water.

“Throughout Africa,” Dr. Maathai said in her Nobel lecture, “women are the primary caretakers, holding significant responsibility for tilling the land and feeding their families. As a result, they are often the first to become aware of environmental damage as resources become scarce and incapable of sustaining their families.”

In all her work, Dr. Maathai fought the notion that underprivileged people must rely on outsiders for help. In her 2006 memoir “Unbowed,” she recalled repairing the walls of her mother’s hut with dung.

“It was important to share that experience,” she told National Public Radio, “because it’s very easy for people now to see the Nobel Peace Prize and to see the PhD and to see all the good things that are now with me and forget where I came from.”

When she won the Nobel, Dr. Maathai was reported to be the first woman in east and central Africa to earn a doctorate. She owed her education in part to her brother, who one day asked their parents why she didn’t go to class with the boys. Her parents then enrolled her in school.

She later studied in the United States through a leadership program for young Africans, earning two degrees in biology — a bachelor’s in 1964 from the school now known as Benedictine College, in Atchison, Kan., and a master’s from the University of Pittsburgh in 1965.

Her doctorate, in anatomy, came from the University of Nairobi, where she later chaired the department of veterinary anatomy.

Her marriage to Mwangi Maathai ended in divorce.

“I think my activism may have contributed to my being perceived as a woman who is not too conventional,” she said in a 2004 interview with The Post. “And that puts pressure on the man you live with, because he is then perceived as if he is not controlling you properly.”

Survivors include three children and a granddaughter, according to the Green Belt Movement Web site.

As a student in the United States, Dr. Maathai experienced such wonders as the Mississippi River, the winds that she said blew through Kansas “like violins” and an American autumn.

“Trees losing their leaves!” she told The Post. “They were of course very beautiful and different colors, and this doesn’t happen in Kenya. . . . And then they all fell, every one of them. And the tree literally went to sleep.”