In his first public speech, before a similar military parade in 2012, Mr. Kim promised that North Koreans would “never have to tighten their belt again.” Pyongyang, the showpiece capital where the people most loyal to the regime are allowed to live, has since gone through a major face-lift. But economic conditions for people in the rest of North Korea remain dire, according to international human rights groups.

Mr. Kim’s efforts to reinvigorate the economy are hampered by United Nations sanctions, prompted by the North’s nuclear and long-range missile programs. His government also spends lavishly to maintain the personality cult surrounding his family.

On Saturday, Mr. Kim did not mention his nuclear or missile programs but vowed to continue his policy of pursuing a nuclear arsenal and economic development simultaneously.

“Our revolutionary armed forces are ready to fight any form of war the American imperialists want,” he said, while the only prominent foreign guest — Liu Yunshan, a member of the Standing Committee of the Chinese Politburo — stood nearby.

Mr. Liu is the highest-ranking Chinese official to visit the North since Mr. Kim rose to power in late 2011. President Xi Jinping of China also sent a warm note to Mr. Kim, a sign that relations may be thawing after a deep chill.

In the message, widely reported by the Chinese state media, Mr. Xi said he not only extended the congratulations of the Chinese Communist Party but sent his own personal good wishes. He hailed Mr. Kim for having achieved “positive progress in developing the economy, improving livelihoods, and so on.”