Newly elected members of Pakistan's National Assembly were sworn in Saturday, officially marking the first transition of power between democratically elected civilian governments in the nearly 66-year history of this coup-prone country.

Among the steep challenges the legislators will face: massive energy shortages that leave some Pakistanis without power for up to 20 hours a day; a badly ailing economy that might force the Muslim-majority nation to seek an international bailout; and ongoing militant activity by Taliban and other extremists whose violence has killed thousands in the past decade and badly strained Pakistan's alliance with the United States.

Arriving at the Parliament building in Islamabad on a bright, hot day under tight security, the lawmakers were immediately mobbed by reporters. Among those in the spotlight was the incoming prime minister, Nawaz Sharif, whose Pakistan Muslim League-N handily won the May 11 elections.

"We are facing many challenges, but God willing, we will overcome them," said Sharif, who twice served as prime minister in the 1990s and was ousted in a 1999 military coup. The 63-year-old 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 formalizing their membership.

The PML-N has captured 176 seats in the 342-member lower house of Parliament. The previous ruling Pakistan People's Party was crushed, earning just 39 seats.

Former cricket star Imran Khan's Pakistan Tehreek-e-Insaf party won 35 seats, and has pledged to act as a strong opposition. Khan, who is still recovering after fracturing three vertebrae and a rib when he fell off a forklift in the last few days of the campaign, did not attend Saturday's session.

The simple act of the oath-taking was historic in Pakistan, a country of 180 million that was carved out of India in 1947. For most of its history, military coups and other political turmoil prevented elected civilian governments from finishing their terms.

Despite its widely perceived incompetence, the fact that the government led by the People's Party survived its full five-year term was a significant accomplishment. Pakistanis hope peaceful transfers of power between civilian leaders will become the norm and ultimately lead to more government accountability.

Energy crisis, economy top of agenda

The last time Sharif was prime minister his government was widely reviled to the point where many Pakistanis were happy to see the army kick him out. But many in the country are now happy he's back, and, because of his business background, are especially keen on seeing him move to fix the economy.

Nawaz Sharif has said he wants to improve the country's relations with India and the U.S. (K.M. Chaudary/Associated Press)

Sharif and his advisers are searching for ways to revive the economy without turning to the International Monetary Fund for a bailout. Perhaps the most critical step in saving the economy will be to address the energy crisis, which has been exacerbated by the refusal of many Pakistanis to pay their electricity bills.

How Sharif deals with two other countries — India and the United States — could also define his rule.

India and Pakistan, which are both nuclear-armed, have fought three major wars, but in recent years have tried to improve their relations. Sharif has said he wants those efforts to continue, not least because India could prove a good trading partner.

Dealing with the United States could be in some ways a trickier matter. While officially a U.S.-ally in the fight against terrorists, Pakistanis have long been at odds with the U.S. on some of its tactics, especially drone strikes on Pakistani soil.

The most recent drone strike came Wednesday, and the Pakistani Taliban militant group said it killed their deputy leader, Waliur Rehman.

Sharif wants to resolve differences with the Pakistani Taliban through peace talks, but after the recent strike the Pakistani Taliban said they would not participate in any negotiations.

A statement issued by the PML-N late Friday said Sharif had expressed "deep disappointment" over the Wednesday drone strike. The statement called the strike a violation of Pakistan's sovereignty and international law. It did not mention Waliur Rehman or the Pakistani Taliban.

The statement said a Sharif aide had conveyed his sentiments to the U.S. Embassy.

The U.S. regards such missile attacks as legal, but President Barack Obama recently described plans to further restrict drone use in the future. According to the statement, the Sharif aide described the strike as especially regrettable since it came within days of Obama's speech.