PYONGYANG (Reuters) - Thousands of ecstatic North Koreans joined a mass rally and parade on Tuesday as leader Kim Jong Un capped off the consolidation of his power at a ruling party congress at which he formalized its claim to be a nuclear weapons power.
Kim used the party congress, the first in 36 years, to highlight North Korea's aim to expand its nuclear arsenal, in defiance of U.N. sanctions, though he said the weapons would only be used if North Korea was threatened with similar weapons.
Kim also set out a five-year plan to revive his isolated country's creaking economy, although it was short on targets, and the party enshrined Kim's "Byongjin" policy of simultaneous pursuit of nuclear weapons and economic development.
"Under the authorization of Workers' Party Chairman Kim Jong Un, the Central Committee sends the warmest greetings to the people and soldiers who concluded the 70-day battle with the greatest of victory and glorified the Congress as an auspicious event," Kim Yong Nam, the titular head of state, told the rally under overcast skies in the capital's Kim Il Sung Square.
North Korea had been engaged in a 70-day campaign of accelerated productivity in the run-up to the Workers' Party congress, including sprucing-up the capital, a grueling exercise that left many people exhausted, Western residents said.
But there was no sign of that at Tuesday's rally, where thousands shouted "manse!", or "live forever!" while clasping their hands in the air or waving pink flowers as they passed before Kim and other top officials on a leaders' platform.
Kim, 33, had traded the western-style suit he wore at the four-day congress for the more traditional uniform of North Korean leaders, a dark jacket buttoned to the collar.
He smiled and waved at the crowd and chatted with military and party aides, state media footage showed.
Kim's sister, Kim Yo Jong, who was formally elected by the congress to the party's Central Committee, stood next to him for some of the time.
The young leader Kim, who assumed power in 2011 after his father's death, took on the new title of party chairman on Monday. The promotion - his previous party title was first secretary - had been predicted by analysts who had expected Kim would use the congress to further shore up his power.
Among other changes at the congress, a former army Chief of General Staff who South Korean media had reported had been purged and executed, was elected alternate member of the party Politburo and a member of the powerful Central Military Commission.
The first congress since 1980 was seen by North Korea-watchers as a move to restore the central role of the party while diluting the political role of the military.
Old rival South Korea denounced North Korea's nuclear ambitions, seeing little cause for optimism in a conciliatory gesture Kim made on the weekend when he said military talks were needed with the South to discuss ways to ease tension.
South Korea President Park Geun-hye said the North showed no sign of willingness to change but only made "preposterous claims about being a nuclear weapons state".
The two Koreas remain in a technical state of war since their 1950-53 conflict ended in a truce, not a peace treaty. North Korea regularly threatens the South and its major ally, the United States, which it accuses of planning a nuclear attack.
Relations between the Koreas have been at a low since North Korea conducted its fourth nuclear test in January, which also brought tougher U.N. sanctions backed by lone major ally China, which disapproves of North Korea's development of nuclear weapons.
Despite the sanctions, North Korea has pressed ahead with its nuclear and missile development, and said it had succeeded in miniaturizing a nuclear warhead and launching a submarine-based ballistic missile.
Chinese President Xi Jinping sent congratulations to Kim for his promotion at the party congress. There was no direct mention of North Korea's nuclear program in Xi's message.
"We will make efforts together with the DPRK side to bring happiness to the two countries and their peoples and contribute to peace, stability and development in this region by steadily developing the Sino-DPRK friendship and cooperation," North Korea's state KCNA news agency quoted Xi as saying.
DPRK stands for Democratic People's Republic of Korea, the North's official name.
An unusually large contingent of 128 foreign journalists were issued visas to visit during the congress, but their access to formal proceedings was limited to a brief visit by a small group to the congress venue on Monday.
BBC correspondent Rupert Wingfield-Hayes and two his colleagues who had been in North Korea to cover the visit of a group of Nobel laureates ahead of the congress were expelled from the country on Monday over his reporting.
Additional reporting by Jack Kim in Seoul and Ben Blanchard in Beijing; Writing and additional reporting by Tony Munroe; Editing by Nick Macfie, Robert Birsel