By Mubasher Bukhari and Mehreen Zahra-Malik
ISLAMABAD (Reuters) - Pakistan's elected government completed its full five-year term on Saturday, the first in the country's turbulent history to do so, leaving a legacy of Taliban violence, sectarian unrest, chronic power cuts and a fragile economy.
Parliament was dissolved at midnight after completing its term, and a caretaker administration will manage the government until general elections which must take place within 90 days.
Prime Minister Raja Pervez Ashraf was expected to remain in office until the appointment of a caretaker prime minister, a process expected to take a few days.
Pakistani newspapers noted the historic nature of the changeover in a country known for political upheaval and long bouts of military rule, while attacking the outgoing government's record on the economy and security.
"For the first time in the history of this country, an elected government has completed its tenure in office; and to that extent it can be said that history has been made," said an editorial in The News.
"That truly unfortunately, is only the form. What will be the judgment of history when it studies the content? Will it not reveal it to be a woeful tale of failure -- the failure of our elected leaders to truly make history."
Ashraf defended his government in a televised farewell speech, saying it had launched economic reforms, raised the salaries of state workers and launched development projects.
"It is true that we could not meet the expectations of the people of Pakistan, but we tried our best to control the problems and strengthen democracy," he said.
The government managed to stay in power despite frequent showdowns with Pakistan's powerful generals and an increasingly interventionist Supreme Court that pursued top officials.
The military, which has ruled Pakistan for more than half its 66-year history through coups or from behind the scenes, has long regarded the civilian rulers as corrupt and incompetent.
ARMY SAYS IT WILL KEEP OUT OF POLITICS
Army chief General Ashfaq Kayani, however, has vowed to keep the military out of politics and there are no signs the generals are backing any particular party for the poll.
The army, long regarded by Pakistanis as the country's most effective institution, lost face when U.S. special forces killed Osama bin Laden in a unilateral raid in the town of Abbottabad in 2011.
Critics of the government say it missed a valuable chance to capitalize on rare public criticism of the military after that operation to assert civilian rule and demonstrate it was serious about tackling the country's long list of problems.
Western allies have poured billions of dollars in aid into Pakistan, worried that growing public anger over corruption, poverty and energy shortages, may boost recruitment to Islamist militant groups threatening to destabilize Pakistan and beyond.
While the number of Taliban suicide bombings has dropped, the government has failed to contain sectarian violence.
Hardline Sunni groups led by Lashkar-e-Jhangvi have stepped up bombings and shootings of minority Shi'ites, killing hundreds since the start of this year.
The government may soon have to turn again to the International Monetary Fund to keep the economy afloat and avert a balance of payments crisis.
The Asian Development Bank, one of Pakistan's biggest lenders, estimates the government may need up to $9 billion from the IMF.
"There are a number of challenges that the outgoing government has left for the next elected dispensation to tackle," said an editorial in Dawn newspaper.
"Not least among them is security, the economy and a simmering Baluchistan," it added, referring to a province where Sunni militants have been stepping up attacks on Shi'ites.
The United States, a major aid donor despite strained ties with Pakistan in recent years, will be closely watching the elections in a country where the military shapes foreign policy with the help of the powerful intelligence agencies.
Looking ahead to elections, whose date has not been set yet, some Pakistanis said they were desperate for change and many were critical of the ruling center-left Pakistan People's Party.
"We have tried them (the PPP) for five years. Is that not enough? Anyone who votes for them again will either be a fool, or will be doing so for selfish reasons," said grocery store owner Gul Mohammad.
"All those who care for this country will never vote for them again," he said.
The PPP could face stiff competition in the election from opposition leader Nawaz Sharif, who was toppled by a military coup in 1999, as well as cricketer-turned-politician Imran Khan.
Former military leader General Pervez Musharraf is expected to return from self-exile in Dubai on March 24 to take part in the election.
(Writing by Michael Georgy; Editing by Roger Atwood)