From the pulpit of Myeongdong Cathedral in central Seoul, Cardinal Kim boldly criticized the military dictators who governed South Korea for three decades. He dismissed what he described as their “despotic” rule, and he advocated fearlessly for democracy. Pope Benedict XVI said he was deeply saddened by the death of Cardinal Kim, who was the longest-serving cardinal and a beloved spiritual leader in South Korea.

President Lee Myung-bak, a Protestant, called Cardinal Kim’s death “a great loss to the nation.” Chung Se-kyun, head of the Democratic Party, the main opposition, called the cardinal “a big guiding star in our nation’s modern history.”

Cardinal Kim was archbishop of Seoul from 1968 until 1998, and he was also in charge of the Diocese of Pyongyang in North Korea from 1975 until 1998. He regretted that he was never able to travel to Pyongyang, once a center of Christianity in the Korean Peninsula, because the Communist government there opposed a visit.

He was born in 1922 in Daegu, in central South Korea, and was the youngest of eight children. His father was a crockery salesman and his grandfather, a convert to Catholicism, died in prison during bloody persecutions of Catholic converts in Korea during the 19th century.

He was ordained in 1951 during the Korean War and was named a cardinal by Pope Paul VI in 1969.

During his time as cardinal, the number of Catholics in South Korea increased more than sixfold. But his influence went beyond the nation’s five million Catholics.

When South Korea’s authoritarian leaders tolerated, if not encouraged, the kidnapping and torturing of dissidents and the beating and jailing of students calling for democracy, Cardinal Kim was often a lone voice opposing the brutality. He became a moral force whose support was sought by dictators and opposition leaders.

When President Chun Doo-hwan visited him shortly after taking power in a military coup in 1979, the cardinal chastised him, comparing his illegal seizure of the government to “an outlaw gunfight in a Western movie.”

The Myeongdong Cathedral served for decades as a haven for student activists, migrant workers and labor leaders, among others. “You can step on me, then the priests and nuns behind me, before you can take away the students,” he told a police chief in 1987 when Mr. Chun’s government sought to arrest student activists seeking refuge in the cathedral.

“Cardinal Kim’s presence among us was a great consolation during the harshest time of our nation,” said Cardinal Nicholas Cheong Jin-suk, the archbishop of Seoul.