Pakistan's Sharif completes long journey back to power Nawaz Sharif is sworn in as prime minister Wednesday He held office twice in the 1990s, but was overthrown in a military coup He returned from exile in 2007 and his party won elections last month Analysts say he faces a raft of thorny challenges, including security and the economy Islamabad, Pakistan (CNN) -- As political comebacks go, Nawaz Sharif's is among the more remarkable. He served two terms as Pakistan's prime minister in the 1990s before he was overthrown in a military coup and banished into the political hinterlands. After a Pakistani court sentenced him to life in prison for hijacking and terrorism, he managed to negotiate his way into exile in Saudi Arabia, where he remained for seven years, waiting for the political tides to shift and allow his return. On Wednesday, he completed his long journey back to power and became prime minister for an unprecedented third term. The Pakistani National Assembly, where his political party secured control in elections last month, elected him prime minister with 244 votes. Later Wednesday, he took the oath of office from President Asif Ali Zardari, one of his longtime political rivals whose term ends later this year. Zardari's Pakistan Peoples Party (PPP) had been in government since 2008. This year, it became the first elected administration in the country's history to successfully see out a full term in office and hand over power democratically. But that milestone didn't help the PPP at the ballot box last month. Following a term plagued by corruption allegations, militant violence, economic torpor and power shortages, its support fell away in an election marred by extremist attacks on candidates. Sharif's Pakistan Muslim League-Nawaz, on the other hand, performed strongly, capitalizing on his image as a flag-bearer for private industry and entrepreneurship with promises to revive the country's economic fortunes. Stern challenges Now, as he takes the reins of government again, he will have to face up to Pakistan's raft of daunting challenges. His economic stewardship will be quickly put to the test. Analysts say Sharif, the scion of an industrial family and one of the country's richest people, has typically favored large, showy infrastructure projects such as highways as a way to spur economic activity. But with Pakistani's public finances in a fragile state, finding the funds for big building plans could prove difficult, observers say. He also has the complex task of resolving the country's energy crisis, which has resulted in prolonged power outages that hurt businesses and sometimes provoke street protests. The security situation in the country remains a severe problem, as the widespread attacks during the elections by the Pakistani Taliban and other extremists showed. Sharif has floated the idea of holding talks with the Taliban, but some analysts say the country's powerful military, with whom Sharif has clashed in the past, will hold the final word on key security and foreign policy decisions. Stance on drones? Until Wednesday, when he called for an end to drone strikes, his stance on the United States' unpopular program in Pakistan's tribal areas that border Afghanistan was unclear. "The campaign of drone strikes should be shut down," Sharif said in his acceptance speech. We must work together to ensure Pakistan's sovereignty. Imran Khan, the former cricket star whose young party has become one of the main opposition groups in parliament, has called on Sharif to bring an end to the U.S. program. Sharif has condemned drone strikes in the past, including the one last week that killed the Pakistani Taliban's No. 2 leader. But analysts say he had good working relations with the United States during his previous terms in office and is likely to take a similarly pragmatic approach once back in power. He has said he will pursue closer ties with Pakistan's neighbor and archrival, India. During his second term as prime minister, in the late 1990s, Sharif oversaw Pakistan's emergence as a nuclear power, for which many Pakistanis still hold him in high regard. It remains to be seen what his third term will be remembered for. CNN's Shaan Khan reported from Islamabad, and Jethro Mullen reported and wrote from Hong Kong.