LONDON — Nawaz Sharif took office as Pakistan’s prime minister for an unparalleled third time on Wednesday, vowing to tackle the country’s crippling electricity crisis and issuing an urgent call for the end of American drone strikes on Pakistani soil.

“The chapter of daily drone attacks should stop,” a grave-faced Mr. Sharif told the packed lower house of Parliament, where he won a comfortable majority of votes to become prime minister. “We respect the sovereignty of other countries, but others should also respect our sovereignty.”

Those comments resonated with many Pakistanis who view the C.I.A. missile strikes as a troubling symbol of American aggression — even if they occasionally kill Pakistan’s own enemies, like the country’s deputy Taliban leader, Wali ur-Rehman, who died in an attack last week.

But the rate of drone strikes is already declining sharply, amid tough scrutiny of the program in the United States and new restrictions from President Obama. And though the drone issue was a galvanizing one through the campaign season, Mr. Sharif is likely to face even more complex foreign policy challenges now that he is in office.