NAIROBI (Reuters) - Kenya’s longest-serving president Daniel Arap Moi, whose rule was marred by corruption and torture of opponents, died on Tuesday, the office of the president said.

He was 95.

There was no immediate explanation for Moi’s death, but he had been in and out of hospital with breathing problems in recent months.

Plaudits poured in from Kenyan politicians, but some of his victims were less forgiving.

“Our nation and our continent were immensely blessed by the dedication and service of the late ... Moi, who spent almost his entire adult life serving Kenya and Africa,” President Uhuru Kenyatta said in a statement.

Moi died peacefully in hospital at 5.20 a.m. (0220 GMT), surrounded by his family, said his son Gideon Moi, a senator.

Moi came to power in 1978, when he was serving as vice-president and the nation’s first leader President Jomo Kenyatta died. He remained in power until the end of 2002 when his constitutional term ran out.

Uhuru Kenyatta, the son of Jomo Kenyatta, was Moi’s preferred successor but lost the election to the opposition. Uhuru Kenyatta became president in 2013.

Moi is credited for keeping Kenya relatively stable compared with its troubled neighbors, and he worked for peace in the region.

But he oversaw massive corruption scandals that are still costing Kenyan taxpayers. One scandal, Goldenberg, led to the loss of at least $1 billion in central bank money via compensation payments for bogus gold and diamond exports.

The economy stagnated under Moi, leaving millions mired in poverty.

Diplomats said an attempted coup in 1982 transformed Moi from a cautious, insecure leader into a tough autocrat.

Moi rewrote the constitution to legalize de facto one-party rule, which secured power for his Kenya African National Union (KANU) until 1991, when Moi caved in to international pressure to reintroduce multi-party politics.

Slideshow ( 11 images )

“I STILL CARRY SCARS”

His government set up interrogation chambers in the basement of Nyayo House, a government building in central Nairobi that now houses the immigration department.

Thousands of activists, students and academics were held without charge in the underground cells, some of them partly filled with water.

Slideshow ( 11 images )

Prisoners say they were sometimes denied food and water and beaten to confess fictitious crimes or just for revenge.

“There remains the legacy of disappearances and unexplained deaths, detention without trial, repression of freedom of expression and the media,” said human rights lawyer Gitobu Imanyara, who was held in solitary confinement for two years.

“I never knew if I was going to make it out alive - I still carry scars. Some people were not as lucky as I am. They died. These are the people we need to remember.”

Moi barely survived demands for his resignation over the 1990 murder of Foreign Minister Robert Ouko, an important Luo leader. In 2010, a government inquiry into the death, presented to parliament five years after it was written, said the murder was carried out in one of Moi’s official residences.