Kim Jong Il, the strangely antic and utterly ruthless heir to North Korea’s Stalinist dictatorship, died of an apparent heart attack Saturday, state media reported Monday. He was said to be 69.

During his reign, he menaced the world with his nuclear ambitions and presided over a famine that killed hundreds of thousands of his subjects.

Mr. Kim formally succeeded his father, Kim Il Sung, in 1994, less than three years after the collapse of North Korea’s longtime sponsor, the Soviet Union. With the end of Soviet trade subsidies and security guarantees, Mr. Kim found himself in charge of a broken and vulnerable country.

He plowed his nation’s scant resources into nuclear arms and attempts to build missiles capable of striking the West Coast of the United States, and he used what many North Korea watchers called nuclear blackmail to extract international aid in the form of fuel and food.

Mr. Kim had a knack for keeping the world on edge. North Korea shot ballistic missiles over Japan in 1998 and detonated a small nuclear device in 2006. It sold missiles to Iran, Syria and Pakistan, among other countries, stoking fears that North Korean-made weapons of mass destruction would find their way to terrorists.

Axis of evil

In response to this volatile menace, President George W. Bush identified North Korea, along with Iran and Iraq, as part of an “axis of evil” in his 2002 State of the Union speech. From 1988 to October 2008 — when a new agreement was reached on nuclear inspections — North Korea kept company with Cuba, Iran, Sudan and Syria on the State Department’s list of state sponsors of terrorism.

In North Korea, Mr. Kim was relentlessly propagandized as “Dear Leader,” a name meant to evoke a benevolent force protecting the country from destructive outside influences. His father, dubbed “President for Eternity” after his death, had been “Great Leader.” The two men built a cult of personality that was dangerous to challenge.

Echoing his father’s policies, Mr. Kim tolerated no dissent, and a vast network of secret police and brutal labor camps enforced his rule. He restricted all travel abroad, and those caught trying to defect were severely punished.

During Mr. Kim’s reign, North Korea maintained one of the world’s largest standing armies, despite a famine from 1996 to 1999 that killed as many as 1 million people. Food shortages persisted because of the government’s reluctance to open the country to international aid organizations.

Like his father, Kim Il Sung — who founded the North Korean state, with Soviet patronage, after World War II — Mr. Kim put great emphasis on the doctrine of “juche,” or self-reliance. Experts said this accounted for his unpredictability when negotiating with other governments or with nongovernmental organizations that wanted to ship grain to hundreds of thousands of starving North Koreans.

North Korea’s treaty violations and its production of weapons-grade uranium and plutonium didn’t help the situation as they repeatedly disrupted disarmament-for-aid negotiations involving South Korea, the United States, Japan, China and Russia.

Very little is known for sure about Mr. Kim and his family, for reasons of state security. What glimmers have become available show a man accustomed to living in a kind of opulence known to very few, if any, other North Koreans.

He enjoyed fine cognac and cuisine and a harem of women dubbed his “Joy Brigade.” On a state visit to Moscow in 2001, he traveled by special armored train that did not spare the smallest luxury, including silver utensils, the finest Burgundy wine and entertainment provided by singing female conductors.

He was fond of bouffant hairdos, big-rim sunglasses and jumpsuits — a bizarre look that prompted the Economist magazine to feature him on its cover with the phrase “Greetings, Earthlings.”

Although Mr. Kim was reputedly an avid Internet user — while very few North Koreans seemed to have uninterrupted electrical power — his regime cultivated in its citizens a paranoid view of the outside world.

North Koreans were taught to fear invasion from the South, with whom the North has remained technically at war since 1950. Internally, he portrayed international aid groups as enemies paying tribute.

“Kim Jong Il developed nuclear weapons for regime security,” said Mike Breen, a Seoul-based author and journalist who has written about North Korea. “He posed no threat to world security in the popular understanding of the phrase. That is, he was not a madman with his finger on the trigger.

“He did, however, upset the international agreement on weapons of mass destruction by withdrawing from the United Nations pact which limits nuclear weapons to the five major powers.”

Breen offered two interpretations of North Korea’s nuclear development.

“One is that North Korea intended all along to be a nuclear power,” Breen said. “The other is that the country did it to develop a bargaining chip with the U.S. North Korea had for decades played off the Soviets and Chinese — brilliantly — for benefits.”

Overture to U.S.

After the Soviet Union collapsed, Breen said, North Korea wanted to improve relations with the United States. “The U.S. rejected this advance,” he said, “refusing to even talk, and the North Koreans developed nuclear weapons to get American attention.”

Bruce Cumings, a University of Chicago history professor and an authority on North Korea, said Mr. Kim’s goal “was to sacrifice everything toward the end of regime survival.”

“From the standpoint of the leadership, they are still in power, the regime has survived,” Cumings added, “and so his legacy is a successful one for them — and deeply tainted for anyone else.”

Birth myth

Mr. Kim’s official biography is completely unreliable, combining the supernatural with traditional Korean mysticism.

North Koreans are told that Kim Jong Il was born Feb. 16, 1942, on Mount Paektu, North Korea’s tallest peak. Legend says that a magic swallow foretold his birth and that a double rainbow and new star in the heavens heralded his coming.

Many Western scholars believe that Mr. Kim was born Feb. 16, 1941, in the Siberian village of Vyatskoye, where his father was training for guerrilla warfare against the Japanese.

His mother, Kim Jong Sook, died during a pregnancy in the late 1940s, and a younger brother drowned in Pyongyang in 1947, after his father, newly installed by the Soviets, returned to Korea.

The numbers of Kim Il Sung’s and Kim Jong Il’s marriages and children are unverifiable.

The younger Kim is said to have had a long affair with and possible marriage to Sung Hae Rim, a North Korean movie actress who nurtured in him a lifelong fascination with the film industry.

His father forced him into a marriage with Kim Young Sook, the daughter of a high-ranking military officer, and with her he had at least one child. He had several children in the early 1980s with Ko Young Hee, a dancer in a state troupe. Most recently, he was reported to have married his personal secretary, Kim Ok.

After attending elite schools for children of revolutionaries, Kim Jong Il graduated in 1964 from Kim Il Sung University in Pyongyang.

Rapid advance

He advanced rapidly in the ruling party, rising to chief of the Department of Propaganda and Agitation by the early 1970s. Little was heard from him in public until 1992, but Mr. Kim for decades “was the main actor behind the intensification of the Kim Il Sung personality cult,” Breen said, referring to Mr. Kim’s promotion of lavish construction projects to deify his father.

He became a member of the powerful Central Committee in 1980, and at the Party Congress that year, he was clearly designated as his father’s political heir. State media began calling him “the great successor to the revolutionary cause.”

Mr. Kim’s takeover in 1994 marked the first dynastic succession in a communist-ruled country. But unlike his father, the tall and commanding Kim Il Sung, he was without charisma.

Cumings called Mr. Kim a sullen recluse who “doesn’t like to meet people [and is] generally uncomfortable in the role that history dealt him.”

After his father’s death, Mr. Kim took the titles of chairman of the National Defense Committee and general secretary of the Korean Workers’ Party.

Once in control, Mr. Kim justified his inaction in the face of impending famine as in keeping with a three-year mourning period for his father. Breen said Mr. Kim managed to avoid “direct blame while demonstrating his loyalty to his father in a way that resonated with Korean tradition.”

Stagnant economy

Mr. Kim’s greatest struggle was with the North Korean economy, which stagnated after the withdrawal of Soviet aid. He made half-hearted attempts at privatization, including the private sale of grain, but he found those efforts posed too great a risk to his obsessive need for total control.

In 2000, he received South Korean President Kim Dae-jung in what appeared to be an attempt to begin normalizing relations between the two countries. But because of his displeasure with the United States, he delayed negotiations on opening rail lines between the countries and arranging reunions for families with members on opposite sides of the border.

Meanwhile, the North Korean leader constantly provoked his neighbors with aggressive behavior: the missile fired over Japan in 1998, for instance, or the naval battle that erupted in June 2002 between South and North Korean vessels in the Yellow Sea after several defections from North Korea.

Four South Koreans and as many as 30 North Koreans died in the 2002 naval engagement, an incident to which Mr. Kim offered a perplexing response. He issued a tirade about U.S. efforts to “push relations to the brink of war” and a note of congratulations about South Korea’s victory in a World Cup soccer match.

More recently, the North Koreans were blamed in 2010 for shelling South Korean territory called Yeonpyeong Island — which left two South Korean marines dead — and sinking the South Korean warship Cheonan, killing 46 sailors. The North Koreans reportedly acknowledged the shelling but denied the sinking. Some outside experts explained those actions as displays of might that were undertaken while a succession process was unfolding in Pyongyang.

Alexandre Y. Mansourov, who is a North Korea specialist at the Asia-Pacific Center for Security Studies in Honolulu and who has lived and studied in North Korea, once wrote that Kim “is not Satan, but his station in life is to be Devil’s advocate.”

“Now he has to repudiate his lifetime beliefs and achievements, scrap his father’s legacy, and reincarnate as a saint, if he were to reform, let alone to dismantle the North Korean Gulag and Pyongyang’s world of ‘1984,’ ” Mansourov wrote. “Kim Jong Il can adjust at the margins, but he is unlikely to abandon his core. For Kim Jong Il is a survivor, not a martyr.”

Staff writer Chico Harlan in Tokyo contributed to this report.