At 86, his gnarled hands grasping a walking stick as he ambled around his small patch of land facing Mount Kenya, Joseph Macharia Mwangi recalled with bitterness the years that he had spent fighting the British colonial government in Kenya.

Seven decades ago, he had camped with Mau Mau rebels on that mountain and in the forests, braving frigid rain, lions and elephants. He was shot twice by British troops, he said, and almost died. And when the colonial forces eventually captured him, he said he was tortured and sentenced to two years of hard labor.

“The British forces were really hard on us. They were terrible,” said Mr. Mwangi, who served directly under the uprising’s storied leader, Dedan Kimathi. “Now we want an apology and money for what they did.”

Kenya’s bleak colonial past will loom large as King Charles III officially begins a four-day tour of the East African nation on Tuesday. It is his first state visit to any member of the Commonwealth group of nations since he became king last year, and the first to an African country.

Charles and Queen Camilla arrive in a Kenya where many communities are still grappling with the pain and loss they or their families endured over decades of British colonial rule, which lasted from 1895 to 1963. The king is under pressure from human rights groups, elders and activists to redress historical injustices, apologize and pay reparations to those who were tortured and removed from their ancestral lands.

His family has a close association with Kenya. His mother, Queen Elizabeth II, had been visiting the Treetops game lodge in 1952 when she learned that her father had died and she would succeed him as monarch. That year, Britain launched a bloody eight-year campaign to crush Kenya’s independence movement, led by the Mau Mau rebels.

There are still about 400 British military personnel stationed in Kenya for training. King Charles is also being asked to address abuses that some of those troops have been accused of committing over the years. The issue is so touchy that on Monday, Kenyan police blocked a news conference aimed at raising awareness about these accusations.

The king faces a younger generation of Kenyans, some apathetic and others welcoming, but many who are disdainful of the monarchy after learning about its grim and cruel legacy. Many Kenyans have keenly watched as other former British colonies, like Barbados, severed ties with the monarchy or are considering doing so, like Jamaica.

Kenya is a republic, and Charles has no official governmental role, but the country does belong to the Commonwealth, headed by Charles. The Commonwealth, which comprises 56 nations across five continents, was born out of the embers of the British Empire, with the hope of advancing shared values of democracy, peace and economic cooperation.

Buckingham Palace has said that the king will “acknowledge the more painful aspects” of the two countries’ history and “deepen his understanding of the wrongs suffered” during the intense counterinsurgency from 1952 to 1960. Charles told the Commonwealth meeting in Rwanda last year that “the time has come” to “find new ways to acknowledge our past.”

Britain has never directly apologized for its abuses in Kenya but has expressed regret for them. After a lawsuit was filed, Britain paid about 20 million pounds ($24.3 million) a decade ago to more than 5,000 people who had suffered abuse during the Mau Mau uprising. Mr. Mwangi was not among them.

“There’s a lot of pain and harm that has gone unacknowledged and that they refuse to reckon with,” said Aleya Kassam, a Kenyan writer and a co-founder of the LAM Sisterhood, which produces plays, podcasts and musicals about women, including those involved in Kenya’s liberation movements.

“I felt just rage when I learned about that dark history and how much of it is still present,” she said, adding, “I don’t think he should be comfortable at all coming here.”

But for Charles, the trip is a chance to bolster Britain’s relationship with Kenya, a key economic and military ally in a turbulent region.

He will attend a state banquet hosted by President William Ruto, and visit a naval base in the coastal city of Mombasa. A lifelong environmental champion, Charles will visit Nairobi National Park and attend an event celebrating the life of the Nobel Peace Prize winner Wangari Maathai in Karura Forest, which she helped save from developers before she died in 2011.

Wanjira Mathai, the daughter of Ms. Maathai, and an environmental activist herself, said, “I have admired how he’s leveraged his influence and his support on issues of sustainability and the environment for decades, and that has to be acknowledged.”

Ms. Mathai said that Charles and her mother had been close friends who would spend hours talking at conferences or over tea at his office about environmental sustainability and climate change. “So for him to come and honor her legacy is deeply personal,” said Ms. Mathai, who will be meeting the king on this visit.

Charles will also visit a new museum dedicated to Kenya’s history at the site where the country was declared independent in 1963. He will view exhibits documenting Britain’s colonial legacy, particularly the state of emergency when the British government sought to apprehend anyone suspected of belonging to or aiding the Mau Mau.

Millions of people, mostly from the Kikuyu, Kenya’s largest ethnic group, were rounded up during this period, forcibly moved and put in detention camps or villages surrounded by barbed wire fences and trenches lined with sharp sticks. Many of them were tortured, raped, put into forced labor and left to die of disease and starvation.

The crackdown divided the Kikuyu. Those who collaborated with the colonial authorities gained access to large swaths of land that they and their heirs continue to benefit from today.

“There was a lot of agony in those villages,” said Jane Wangechi, 96, who acted as a spy and cook for the Mau Mau. Ms. Wangechi said that her family was moved into the detention villages for three years, during which she said she lost two uncles and a cousin.

The king is also facing calls to account for other abuses and injustices, both old and new.

Across Kenya’s Rift Valley, elders from the Nandi ethnic group are calling on the British government to return the head of Koitalel Arap Samoei, a spiritual leader and anticolonial fighter. The Nandi elders say his head was severed by a British officer in the late 19th century and shipped to England as a war trophy. The Nandi are part of the Kalenjin tribe that Mr. Ruto belongs to.

​​The leaders of the Kipsigis ethnic group also say they want compensation for being forcibly removed from their fertile lands, which paved the way for the arrival of white settlers and the establishment of profitable tea and pineapple farms. This year, a BBC report on sexual abuse on the tea farms owned by British companies sparked resentment and tension over land in Kenya.

Charles’s visit is also resurfacing grievances about the conduct of British soldiers currently in Kenya.

The training unit has also been accused of sexually abusing women, sparking a devastating fire and using harmful chemicals.

In addition, a British soldier was a suspect in the killing of Agnes Wanjiru, a sex worker, in 2012, but was never arrested or charged. An agreement between the two countries exempts British soldiers from prosecution. Some lawmakers want to change that. In August, Kenya’s Parliament launched an inquiry into the activities of British soldiers.

“Agnes has never rested in peace,” Esther Muchiri, Ms. Wanjiru’s niece, said in an interview. “We are not asking for special treatment from the king. We just want him to deliver justice.”