Updated

Former President Kim Young-sam, who formally ended decades of military rule in South Korea and accepted a massive international bailout during the 1997-1998 Asian financial crisis, died Sunday. He was 87.

The chief of Seoul National University Hospital, Oh Byung-Hee, told a televised briefing that Kim died there early Sunday. He said Kim is believed to have suffered from a severe blood infection and acute heart failure before he died.

Kim was taken to the hospital on Thursday due to a high fever, Oh said. In recent years, Kim had been treated at the hospital for stroke, angina and pneumonia, Oh added.

Kim was an important figure in South Korea's pro-democracy movement and opposed the country's military dictators for decades. As president, Kim laid the foundation for a peaceful power transfer in a country that had been marked by military coups.

During his presidency from 1993-1998, he had his two predecessors indicted on mutiny and treason charges stemming from a coup. Still, Kim pardoned the two convicted military strongmen -- Chun Doo-hwan and Roh Tae-woo -- at the end of his term.

Kim also launched a popular anti-corruption campaign and vowed not to receive any political slush funds, though this was later tarnished when his son was arrested on charges of bribery and tax evasion.

He led South Korea in 1994 when the Clinton administration was considering attacking Nyongbyon -- home to North Korea's nuclear complex -- north of communist North Korea's capital, Pyongyang. Kim lobbied against the idea, fearing a possible war.

A U.S. aircraft carrier and a cruiser had been deployed near South Korea's east coast in preparation for a possible airstrike, and the United States planned to evacuate Americans, including its soldiers and their families, Kim said in a memoir.

A U.S. airstrike "will immediately prompt North Korea to open fire against major South Korean cities from the border," Kim said in his memoir, describing his dawn telephone conversation with President Bill Clinton in June 1994.

The crisis eased when former President Jimmy Carter met with the North's leader and founder Kim Il Sung, the grandfather of current ruler Kim Jong Un, in Pyongyang, which led to an accord aimed at freezing North Korea's plutonium-based nuclear programs.

That deal collapsed in 2002 when the United States accused North Korea of running a secret uranium-based program, sparking another nuclear crisis.

After years of denials, North Korea announced in 2009 that it was enriching uranium, a process that gave it a second way to make nuclear bombs.

During the `94 crisis, Carter tried to arrange a summit between Kim and the North's founder -- in what would have been the first such meeting between the leaders of the two Koreas since the 1950-53 Korean War that ended in a ceasefire, not a peace treaty.

But the summit didn't take place because the North's Kim suddenly died of heart attack in July 1994. It took six years before the leaders of the two Koreas -- South Korean President Kim Dae-jung and his North Korean counterpart Kim Jong Il -- held a summit in Pyongyang. Kim Jong Il was the father of Kim Jong Un.

North Korea continued to cause security jitters for rival South Korea during Kim's presidency. In 1996, a North Korean submarine ran aground off South Korea's eastern shores.

The North later expressed its "deep regret" for the intrusion that left 24 North Korean agents and 13 South Koreans dead. It was an unprecedented apology from the North -- though it said the sub drifted into southern waters while on a routine training exercise.

Kim was credited with disbanding a key military faction and bringing transparency to the South's murky financial system. But he was also accused of mismanaging the economy during the Asian financial crisis that toppled some of the country's debt-ridden conglomerates and forced the government to accept a $58 billion bailout from the International Monetary Fund.

Kim is survived by his wife and two sons and three daughters.