Spontaneous celebrations broke out in numerous Pakistani cities as President Pervez Musharraf announced his resignation.
Now the country’s coalition government must set about finding a replacement as well as dealing with pressing economic and security problems.
Musharraf, who took charge in a bloodless coup nearly nine years ago, quit to avoid impeachment on charges of gross misconduct and violating the constitution.
One main coalition party – that of former prime minister Nawaz Sharif, the man ousted by Musharraf in 1999 – insisted he face charges of treason.
Government officials say Musharraf sought immunity from prosecution. But in a nationwide TV address Musharraf said he asked for nothing: “I leave my future in the hands of the nation and the people.”
The army, which has ruled for more than half the country’s 61-year history, has kept out of the controversy.
A new president is due to be elected within 30 days.