SEOUL, South Korea — North Korea’s leader, Kim Jong-un, was re-elected as head of his country’s top governing agency as its rubber-stamp Parliament met in Pyongyang on Wednesday to help consolidate his power by filling top leadership posts vacated in recent purges.

Mr. Kim’s re-election as first chairman of the National Defense Commission indicated that he remained firmly in control despite tightened United Nations sanctions and political upheavals that have rocked the government.

Since succeeding his father, Kim Jong-il, in late 2011, Mr. Kim has sidelined many military leaders and members of the ruling Workers’ Party elite. In December, he executed Jang Song-thaek, his uncle, who had long been presumed to be the second most influential man in Pyongyang, the capital.

Mr. Kim revamped the Supreme People’s Assembly early last month by calling a general election in which state-appointed candidates ran unopposed and all the members won their seats with 100 percent support.