Newly elected members of Pakistan’s National Assembly (NA) were sworn in on Saturday, officially marking the first transition of power between democratically elected civilian governments in the nearly 66-year history of the country.

Among the steep challenges the legislators will face are massive energy shortages that leave some Pakistanis without power for up to 20 hours a day; a badly ailing economy that might force the nation to seek an international bailout; and ongoing militant activity by Taliban and other extremists.

Among the lawmakers in the spotlight was the incoming Prime Minister, Nawaz Sharif (63), whose Pakistan Muslim League-N (PML-N) handily won the May 11 elections.

“We are facing many challenges, but God willing, we will overcome them,” said Mr. Sharif, who is expected to be sworn in as Prime Minister and appoint his Cabinet in the coming week.

Outgoing Speaker of Parliament Fehmida Mirza solemnly administered the oath to incoming legislators at noon. Afterward, lawmakers were called up to the front of the hall one by one to sign documents formalising their membership.

The PML-N won 176 seats in the 342-member Lower House of Parliament. The previous ruling Pakistan Peoples Party (PPP) was crushed, earning just 39 seats.

Former cricket star Imran Khan’s Pakistan Tehreek-e-Insaf (PTI) party won 35 seats, and has pledged to act as a strong opposition. Mr. Imran Khan, still recovering from an accident he met with in the last few days of the campaign, did not attend Saturday’s session.

Pakistanis hope peaceful transfers of powers between civilian leaders become the norm and ultimately lead to more government accountability.

Many Pakistanis are especially keen on seeing Mr. Sharif move to fix the economy. Perhaps the most critical step in Mr. Sharif’s attempt will be to address the energy crisis, which has been exacerbated by the refusal of many Pakistanis to pay their electricity bills.