Inheriting power from his father, he led his nation through a devastating famine while frustrating the U.S. and other global powers with an on-again, off-again approach to talks on giving up nuclear arms in return for food and other assistance. Kim was one of the last remnants of a Cold War-era that ended years earlier in most other countries.
His death after 17 years as leader was announced Monday by state television two days after he died. North Korea's news agency reported that he had died at 8:30 a.m. Saturday after having a heart attack on a train, adding that he had been treated for cardiac and cerebrovascular diseases for a long time. He was 69.
Kim, who reputedly had a taste for cigars, cognac and gourmet cuisine, is believed to have suffered a stroke in 2008 but he had appeared relatively vigorous in photos and video from recent trips to China and Russia and in numerous trips around the country documented by state media.
His longtime pursuit of nuclear weapons and his military's repeated threats to South Korea and the U.S. stoked worries that fighting might break out again on the Korean peninsula or that North Korea might provide weapons of mass destruction to terrorist movements. The Korean War ended more than 50 years ago in a cease-fire, and the two sides remain technically in a state of war.
Kim Jong Il took power after his father, revered North Korean founder Kim Il Sung, died in 1994. He unveiled his third son, the twenty-something Kim Jong Un, as his successor in September 2010, putting him in high-ranking posts. On Monday, the North Korean news agency dubbed the son a "great successor" as the country rallied around him.
Few firm facts are available when it comes to North Korea, and not much is clear about Kim Jong Il, the man known as the "Dear Leader."
North Korean legend has it that Kim was born on Mount Paektu, one of Korea's most cherished sites, in 1942, a birth heralded in the heavens by a pair of rainbows and a brilliant new star. Soviet records, however, indicate he was born in Siberia, in 1941.
His father, who for years fought for independence from Korea's colonial ruler, Japan, from a base in Russia, emerged as a communist leader after returning to Korea in 1945.
With the peninsula divided between the Soviet-administered north and the U.S.-administered south, Kim Il Sung rose to power as North Korea's first leader in 1948. He meshed Stalinist ideology with a cult of personality that encompassed him and his son. Their portraits hang in every building in North Korea, and every dutiful North Korean wears a Kim Il Sung lapel pin.
Kim Jong Il, a graduate of Pyongyang's Kim Il Sung University, was 33 when his father anointed him his eventual successor.
Even before he took over as leader, there were signs the younger Kim would maintain -- and perhaps exceed -- his father's hard-line stance.
South Korea has accused Kim of masterminding a 1983 bombing that killed 17 South Korean officials visiting Burma, now known as Myanmar. In 1987, the bombing of a Korean Air flight killed all 115 people on board; a North Korean agent who confessed to planting the device said Kim had ordered the downing of the plane.
When Kim came to power in 1994, he had been groomed for 20 years to become leader. He eventually took the posts of chairman of the National Defense Commission, commander of the Korean People's Army and head of the ruling Worker's Party. His father remained as North Korea's "eternal president."
He continued his father's policy of "military first," devoting much of the country's scarce resources to its troops -- even as his people suffered from a prolonged famine -- and built the world's fifth-largest military.
Kim also sought to build up the country's nuclear arms arsenal, leading to North Korea's first nuclear test, an underground blast conducted in October 2006. Another test came in 2009, prompting U.N. sanctions.
Alarmed, regional leaders negotiated a disarmament-for-aid pact that the North signed in 2007 and began implementing later that year. The process has since stalled, though diplomats are working to restart negotiations.
North Korea, long hampered by sanctions and unable to feed its own people, is desperate for aid. Flooding in the 1990s that destroyed the largely mountainous country's arable land left millions hungry.
Following the famine, the number of North Koreans fleeing the country rose dramatically, with many telling tales of hunger, political persecution and rights abuses that officials in Pyongyang emphatically denied.
Kim often blamed the U.S. for his country's troubles and his regime routinely derides Washington-allied South Korea as a "puppet" of the Western superpower.
Former U.S. President George W. Bush described Kim as a tyrant. "Look, Kim Jong Il is a dangerous person. He's a man who starves his people. He's got huge concentration camps. And ... there is concern about his capacity to deliver a nuclear weapon," Bush said in 2005.
Defectors from North Korea describe Kim as an eloquent and tireless orator, primarily to the military units that form the base of his support.
He also made numerous trips to factories and other sites to offer what North Korea calls "field guidance." As recently as last week, the North's news agency reported on trips to a supermarket and a music and dance center.
"In order to run the center in an effective way, he said, it is important above all to collect a lot of art pieces including Korean music and world famous music," the Korean Central News Agency story read in part.
The world's best glimpse of the man was in 2000, when a liberal South Korean government's conciliatory "sunshine" policy toward the North culminated in the first-ever summit between the two Koreas. A second summit was held in 2007 with South Korea's Roh Moo-hyun.
Kim was said to have cultivated wide interests, including professional basketball, cars and foreign films. He reportedly produced several North Korean films as well, mostly historical epics with an ideological tinge.
A South Korean film director claimed Kim even kidnapped him and his movie star wife in the late 1970s, spiriting them back to North Korea to make movies for him for a decade before they managed to escape from their North Korean agents during a trip to Austria.
Kim rarely traveled abroad and then only by train because of an alleged fear of flying, once heading all the way by luxury rail car to Moscow, indulging in his taste for fine food along the way.
One account of Kim's lavish lifestyle came from Konstantin Pulikovsky, a former Russian presidential envoy who wrote the book "The Orient Express" about Kim's train trip through Russia in July and August 2001.
Pulikovsky, who accompanied the North Korean leader, said Kim's 16-car private train was stocked with crates of French wine. Live lobsters were delivered in advance to stations.
A Japanese cook later claimed he was Kim's personal sushi chef for a decade, writing that Kim had a wine cellar stocked with 10,000 bottles, and that, besides sushi, Kim ate shark's fin soup -- a rare delicacy -- weekly.
"His banquets often started at midnight and lasted until morning. The longest lasted for four days," the chef, who goes by the pseudonym Kenji Fujimoto, was quoted as saying.
Kim is believed to have curbed his indulgent ways in recent years and looked slimmer in more recent video footage aired by North Korea's state-run broadcaster.
Disputing accounts that Kim was "peculiar," former U.S. Secretary of State Madeleine Albright characterized Kim as intelligent and well-informed, saying the two had wide-ranging discussions during her visits to Pyongyang when Bill Clinton was U.S. president. "I found him very much on top of his brief," she said.
Kim's marital status wasn't clear but he is believed to have married once and had at least three other companions. He had at least three sons with two women, as well as a daughter by a third.
His eldest son, Kim Jong Nam, 38, is believed to have fallen out of favor with his father after he was caught trying to enter Japan on a fake passport in 2001 saying he wanted to visit Disney's Tokyo resort.
His two other sons by another woman, Kim Jong Chol and Kim Jong Un, are in their 20s. Their mother reportedly died several years ago.