North Korean leader Kim Jong-il has died of a heart attack at the age of 69, state media have announced.
Millions of North Koreans were "engulfed in indescribable sadness", the KCNA state news agency said, as people wept openly in Pyongyang.
KNCA described one of his sons, Kim Jong-un, as the "great successor" whom North Koreans should unite behind.
Pyongyang's neighbours are on alert amid fears of instability in the poor and isolated nuclear-armed nation.
Fears were compounded by unconfirmed reports from South Korean news agency Yonhap that the North had test-fired a missile off its eastern coast before the announcement of Kim Jong-il's death was made.
Unnamed government officials in Seoul were quoted as saying they did not believe the launch was linked to the announcement. The South Korean defence ministry has declined to comment.
Following news of Mr Kim's death, South Korea put its armed forces on high alert and said the country was on a crisis footing. Japan's government convened a special security meeting.
China - North Korea's closest ally and biggest trading partner - expressed shock at the news of his death and pledged to continue making "active contributions to peace and stability on the Korean peninsula and in this region".
Asian stock markets fell after the news was announced.
Mr Kim's death was announced in an emotional statement on national television.
The announcer, wearing black, struggled to keep back the tears as she said he had died of physical and mental over-work.
The KCNA later reported that he had died of a "severe myocardial infarction along with a heart attack" at 08:30 local time on Saturday (23:30 GMT Friday).
He had been on a train at the time, for one of his "field guidance" tours, KCNA said.
The state news agency said a funeral would be held in Pyongyang on 28 December and Kim Jong-un would head the funeral committee. A period of national mourning has been declared from 17 to 29 December.
Images from inside the secretive state showed people in the streets of Pyongyang weeping at the news of his death.
Ruling party members in one North Korean county were shown by state TV banging tables and crying out loud, the AFP news agency reports.
"I can't believe it," a party member named as Kang Tae-Ho was quoted as saying. "How can he go like this? What are we supposed to do?"
Another, Hong Sun-Ok, said: "He tried so hard to make our lives much better and he just left like this."
KCNA said people were "convulsing with pain and despair" at their loss, but would unite behind his successor Kim Jong-un.
"All party members, military men and the public should faithfully follow the leadership of comrade Kim Jong-un and protect and further strengthen the unified front of the party, military and the public," the news agency said.
Little is known about Kim Jong-un. He was educated in Switzerland, is aged in his late 20s and is believed to be Kim Jong-il's third son - born to Mr Kim's reportedly favourite wife, the late Ko Yong-hui.
Kim Jong-un was unveiled as his father's likely successor just over a year ago. Many had expected to see this process further consolidated in 2012.
South Korea - which remains technically at war with the north - urged people to "go about their usual economic activities" on Monday, while putting the military on alert.
President Lee Myung-Bak spoke to US President Barack Obama by telephone and they "agreed to closely co-operate and monitor the situation together", a South Korean presidential spokesman said.
Reaction from Washington was muted, with the White House saying it was "closely monitoring" reports of the death.
The US remained "committed to stability on the Korean peninsula, and to the freedom and security of our allies", it said in a statement.
China said it was "distressed" to hear the news of his death. "We express our grief about this and extend our condolences to the people of North Korea," foreign ministry spokesman Ma Zhaoxu was quoted by Xinhua news agency as saying.
Analysts say that with the process of transition from father to son incomplete, Mr Kim's death could herald "very unstable times" in North Korea.
"We have to be very worried because whenever there is domestic instability North Korea likes to find an external situation to divert the attention away from that - including indulging in provocation," Professor Lee Jung-hoon, specialising in international relations at Yonsei University in Seoul, told the BBC.
Christopher Hill, former US representative to the six-party talks on North Korea's nuclear programme, said all parties needed to "keep cool heads".
Britain's Foreign Secretary William Hague said it could be a "turning point" for North Korea to engage more closely with the international community.
Kim Jong-il inherited the leadership of North Korea from his father Kim Il-sung.
Shortly after he came to power in 1994, a severe famine caused by ill-judged economic reforms and poor harvests left an estimated two million people dead.
His regime has been harshly criticised for human rights abuses and is internationally isolated because of its pursuit of nuclear weapons.
Under Mr Kim's leadership, funds have been channelled to the military and in 2006 North Korea conducted its first nuclear test. It followed that up with a second one three years later. Multinational talks aimed at disarming North Korea have been deadlocked for months.
He had reportedly been in poor health since suffering a stroke in August 2008.