North Korean State TV announced the 69-year-old ruler had died of a heart attack during a train trip on December 17.
"I'm announcing in the most woeful mind that our great leader Kim Jong Il passed away due to sudden illness on his way to a field guidance on December 17, 2011," a tearful state television anchorwoman dressed in black announced.
Kim was thought to have suffered a stroke in 2008, but analysts say recent trips to China and Russia suggested his health had improved.
Kim's years of despotic rule were marked by his pursuit of a nuclear-weapons program at the cost of international isolation and untold suffering on the impoverished country's starving population.
His death appears to leave his third and youngest son, little-known Kim Jong Un, in charge of the country of 23 million. North Korea's official KCNA news agency on December 19 lauded the younger Kim as "the great successor" and "the outstanding leader of our party, army, and people."
That it took two days to announce the supreme leader's death, however, raises questions about the future of the family dynasty.
Kim Jong Il is believed to have been born on February 16, 1942 -- his birth attended, according to North Korean lore, by the appearance of a special star and a swallow that descended from heaven.
Known in North Korea as the "great successor of the revolutionary cause," Kim was foisted to power by the death of his father, North Korean founder Kim Il Sung, in 1994.
He came to power with a reputation as a playboy with a taste for cigars, cognac, and gourmet cuisine.
Under his rule, North Korea's economy fell deeper into poverty and up to a million of his countrymen are estimated to have died in a devastating famine in the 1990s.
Uncertainty over the prospect of the 20-something Kim Jong Un taking power put the world on notice.
South Korea, which has been in conflict with its neighbor to the north for more than 60 years, has put its military on alert. Surveillance was boosted along the two countries' 250-kilometer border, although President Lee Myung-bak called for calm and asked residents of the South to carry on with daily life.
In Washington, the White House said President Barack Obama had a telephone conversation with Lee and "reaffirmed the United States' strong commitment to the stability on the Korean Peninsula and the security of [its] strong ally," South Korea.
The United States had terse relations with Kim Jong Il, largely the result of the supreme leader's pursuit of nuclear weapons. President George W. Bush listed North Korea among the three countries in the "Axis of Evil," and stated that he would never tolerate a nuclear North.
But in 2006, the country successfully tested a nuclear weapon, adding to the large conventional arsenal that Kim had built up under his rule, in defiance of international sanctions.
Years of confrontation over the nuclear issue had made North Korea an international pariah, with China often being left in the role of protector in the halls of the United Nations.
In a statement, Chinese Foreign Ministry spokesman Ma Zhaoxu told state media that "We express our deep condolences and send our sincere regards to the North Korean people."
Chinese CCTV aired footage on December 19 of North Koreans mourning in the streets of the capital, Pyongyang.
"I don't know how to put my sorrow in words. I can't talk more," one man said.
The days leading up to Kim's funeral, set to take place in Pyongyang on December 28, will be filled with uncertainty.
North Korea had recently shown interest in resuming the "six-party talks" over its nuclear program that were suspended in 2009, shortly before the country successfully detonated an underground nuclear device.
But the country's foreign policy direction is now up to Kim Jong-un, who has held a handful of military and other posts but has never met with world leaders.
State officials have declared a period of national mourning until December 29. Kim's body will be placed for viewing in the capital's Kumsusan mausoleum, where his father lies in a glass case.
PHOTO GALLERY: Kim Jong Il in pictures:
compiled from agency reports