Kim Jong-il, who has died aged 69 after a heart attack, was the general secretary of the Workers' party of Korea and head of the military in the Democratic People's Republic of Korea (DPRK). He was one of the most reclusive and widely condemned national leaders of the late 20th and early 21st century, and left his country diplomatically isolated, economically broken and divided from South Korea.

Unsurprisingly for a man who went into mourning for three years after the death in 1994 of his own father, the legendary leader Kim Il-sung, and who in the first 30 years of his political career made no public statements, even to his own people, Kim's career is riddled with claims, counter-claims, speculation and contradiction.

There are few hard facts about his birth and early years. The DPRK propagated an extraordinary tale of his birth occurring on Mount Baekdu, one of Korea's most revered sites, and being accompanied by shooting stars in the sky. It is more likely that he was born in a small village in the USSR, while his father was serving as a Soviet-backed general during the second world war.

Kim's early life was spent in the shadows of a self-created legend, his father Kim Il-sung, who returned to Korea in 1945 after independence from Japan, and established, initially with Soviet and Chinese support, the DPRK. Kim's brother and mother both died before he was eight. He was to witness the Korean war from 1950 to 1953, in which hundreds of thousands of Koreans, Chinese and Americans as part of a UN force fought across the country, returning almost to the point at which they had started. The armistice signed in 1953 settled the border between South and North Korea at the 38th Parallel.

With the arrival of the cold war, relations between the two countries (for this is, to all intents and purposes, what they became) were almost completely broken off, with whole families split for the ensuing decades, some for ever. This event and its after-effects, along with the war against the Japanese in the 1940s, was to cast a long shadow over the years ahead, and led to the creation of the wholly unprecedented worship of Kim Il-sung, and his elevation to almost Godlike status. It was also to create the system in which his son was to occupy a similarly elevated a position.

Kim was educated at the newly founded university in Pyongyang, named after his father, graduating in 1964. The 1960s and early 1970s were the golden years for the DPRK. It undertook rapid industrialisation, economically outstripped its southern competitor and enjoyed the support of both the People's Republic of China and the Soviet Union. A state ideology, mixing nationalism and basic Marxist economics, going under the name "Juche", was constructed, and Kim Il-sung effectively silenced, disposed of and cleared away any opposition, isolating the country and exercising an iron grip on the military, the state media, the government and party apparatus.

Kim Jong-il's early career within the party was spent dealing with propaganda. He had a lifelong interest in film, and indeed wrote a treatise, On Cinema, which was to attain the status of canonical truth after his father's death, along with all of his other utterances. In 1973 he became party secretary of the propaganda department, and, in 1974, was designated his father's successor, creating in effect the world's first communist family succession. In 1980 he was elevated to the Politburo, and was granted the title "Dear Leader", as opposed to "Great Leader", which had been granted by his father to himself. In 1991, he was named commander of the DPRK armed forces. The death of his father in 1994 led to his being appointed general secretary of the Workers' party, the ultimate seat of power. His father maintained his position as "eternal president". To this day, the DPRK enjoys a head of state who has been dead since 1994.

There is great controversy over the extent of Kim's powers and influence in the latter years of his father's long period in power. To some historians, Kim was no more than his father's puppet, and had no real basis for power in the party, which explains the bitter years from 1994 in which he disappeared from view, waging a long battle for legitimacy within the party and army. To others, he was a negative, malevolent influence over his father from the 1970s onwards, when North Korea began its long and tragic descent into economic deprivation, isolation, starvation and poverty.

By 1980, South Korea had overtaken its northern neighbour, and was well on its way to being one of the Asian tigers – high-performing economies, with democratic movements ultimately winning power in the 1990s. The withdrawal of most Soviet aid in 1991, with the fall of the Soviet empire, pushed North Korea further down. Kim Il-sung had held a genuine place in the affections of North Korean people. His son was regarded as a shadowy playboy, with rumours circulating over the years that he imported Russian and Chinese prostitutes, and lived a life of profligacy and excess.

More worrying for the international community were the clear connections between Kim and the bombing of a South Korean plane in 1987, which killed 115 people, and the murder by bombing of 17 South Korean officials while on a visit to Burma in 1983. Kim's admissions, years later, when he met the prime minister of Japan Junichiro Koizumi in 2002, that he also had knowledge of the abduction of more than a dozen Japanese people in the 1970s and 1980s, only added to his image as a shadowy, evil character.

This is an oversimplification. Kim inherited the very worst legacy of the cold war, in a country torn apart by colonisation and war, a bitter historical residue that lingers to this day. While he may have had influence on his father, the economic template for the country had been set in the 1950s and 1960s, long before he had any say. Its unsustainability only became clear in the very final years of Kim Il-sung's life. And Kim Jong-il finally had to deal with a complex network of interests in the army and party after his father's death, something which, combined with the immediate impact of bad harvests, created the terrible famines that claimed up to a million North Korean lives from 1995 until 1999. The official state information agency issued a statement, after the worst of this period was over in 2001, saying that North Korea had stood "on the crossroads of life and death".

North Korea had signed an agreement in 1993, brokered by a visit by the former US president Jimmy Carter, to stop its nuclear programme in return for help in building two power-generating nuclear reactors. Disagreements on both sides meant the reactors were not built, and North Korea progressed towards its own nuclear programme in 2003. A brief thaw in relations between the US and the DPRK at the end of the Clinton presidency in 2000 saw high-level visits on both sides, but this stopped momentarily in the George W Bush era, before North Korea was encouraged back to the negotiating table as part of what were called the six party talks from 2006 onwards. The election of Barack Obama as US president in 2008 served to provoke a period of harsh rhetoric, nuclear testing, missile launches, and diplomatic aggression uncharacteristic even for the DPRK. In 2010, Seoul blamed the sinking of a warship on a torpedo attack, and North Korean forces bombarded an island in disputed waters.

Kim was rumoured to have suffered a stroke in late 2008 that incapacitated him. This may have forced him to nominate his youngest son, Kim Jong-un, as his successor, though there is precious little firm evidence for when, why or even if this decision was made.

Kim Jong-il travelled little, and only ever in a train. He visited Russia and China, and had been to Indonesia. He was reputed to have some 30,000 American films in his personal library, and was one of the world's main customers for luxury cognac. According to a Japanese chef who worked for him in the 1980s and 1990s, he had a connoisseur's understanding of the finest cuts of raw fish. While officially married only once, he had a number of "recognised" mistresses, with whom he fathered several children.

International politicians who met him were impressed by his memory for facts and his quick and easy wit. But there is little dispute about his responsibility for a system that saw widespread human rights abuses and perhaps the worst record for press freedom and government transparency in the world.

He is survived by a daughter and three officially recognised sons.

• Kim Jong-il, head of state, born 16 February 1942; died 17 December 2011