Updated

As a country where food and electricity are scarce, North Korea has had little to boast about.

Yet the isolated, impoverished regime hailed what it claimed was its first-ever nuclear test on Monday as a "great leap forward in the building of a prosperous powerful socialist nation."

An atomic war chest would fulfill North Korea's longtime ambition of bolstering its lowly global stature and guaranteeing national security.

Raw Data: North Korean Statement on Alleged Nuke Test

North Korea's official Korean Central News Agency lauded the country's nuclear test as a "historic event" conducted with "indigenous wisdom and technology."

But in reality, it is just as likely to make North Korea even more of an international pariah and further strangle its struggling economy with a fresh wave of economic sanctions.

The United States responded to Monday's announcement with a stern warning that the test, if confirmed, would likely trigger a severe reaction from the U.N. Security Council.

CountryWatch: North Korea | South Korea

Outside the country, North Korean leader Kim Jong Il is viewed as a ruthless dictator who seeks atomic weapons, while starving his people.

But at home, the bouffant-haired Dear Leader is hailed as a prodigious general, visionary demigod and the "Lodestar of the 21st Century." Monday's test will undoubtedly enter the communist lore chronicling Kim's fight against imperialism.

Related Story: South Korean Stocks Plunge After Reported North Korea Nuclear Test

Going nuclear may also have more practical payoffs for Kim. It is one way to solidify his authoritarian rule among the most important group: the military.

Some analysts say Kim needs the military's backing now more than ever, as international pressure builds and there is a growing undercurrent expressing hope for regime change.

From North Korea's point of view, nuclear weapons give the country an unparalleled deterrent from attack, something Kim has increasingly feared after watching the United States invade Iraq and topple Saddam Hussein.

No nuclear-armed country has yet attacked a fellow atomic power.

North Korea has long boasted of its nuclear program, infamously threatening to turn the capital of its rival South Korea into a "sea of fire" during an earlier dispute in the mid 1990s.

Monday's test adds teeth to what has otherwise been blusterous rhetoric.

Kim took power after the 1994 death of his father, having watched communist regimes collapse across eastern Europe under popular uprisings while soldiers mostly stood by.

Hence, the leader's main contribution to North Korean political doctrine is his "songun," or "military-first," policy, in which the military has the primary role in society.

Soldiers get first pickings of the country's scarce resources and are rewarded generously for their service as the vanguard against the outside world.

Analysts say that allowing the armed services carry out a nuclear test, despite international condemnation, provides a morale boost for the military amid constant fears of a foreign attack.

On Saturday, Kim made a rare appearance at a rally with about 500 of his top commanders. While posing for photos in front of the sprawling Pyongyang mausoleum where his father lies in state, the top brass hailed their leader with wild cheers.