President Farooq Ahmed Leghari resigned at the end of another day of political chaos in Pakistan yesterday. He told a news conference that his gesture was designed to uphold the supremacy of the constitution and rule of law.
Mr Leghari, whose five-year term officially expires next November, gave a lengthy explanation of his role in the current constitutional battle between Prime Minister Nawaz Sharif and Chief Justice Sajjad Ali Shah. He accused the prime minister of dividing the supreme court.
The move also brought down Mr Shah, who was removed from office by a rival Supreme Court bench on a technicality.
The twin exits appeared to hand Mr Sharif victory after a trial of strength between the prime minister and the judiciary and president, which unnerved the stock market and paralysed politics.
Sources at the presidency said Mr Leghari announced his resignation shortly after a meeting with the army chief of staff, Gen Jehangir Karmat. The general also held separate talks earlier with Mr Sharif.
Army spokesmen have publicly denied that the military has designs on power, but said that Mr Karmat was mediating to prevent an irretrievable breakdown.
Mr Wasim Sajjad, chairman of the senate and a supporter of Mr Sharif, will become acting president, a presidential spokesman announced, explaining that under the constitution the chairman of the upper house "automatically" takes over until a new election.
Mr Leghari said the Sharif government had asked him on Monday night and again yesterday to annul the 1994 appointment of Mr Shah and appoint the next most senior judge as chief justice.
He said he could have delayed signing for some days but he decided not to exercise that option "because I hold certain principles and I hold the constitution above self".
Mr Sharif has accused the president of taking the chief justice's side in the battle over a contempt case against the prime minister taken by Mr Shah.
Mr Leghari said that if he had been involved in a conspiracy, he would have acted to sack the prime minister after the supreme court had restored his power.
Mr Leghari was a key figure in the Pakistan People's Party (PPP) of former prime minister Ms Benazir Bhutto. He was elected president in November 1993.
But his relations with Ms Bhutto soured and he dismissed her in November 1996. Mr Sharif scrapped the discretionary powers used to force Ms Bhutto out of office soon after he became prime minister in February this year.
Pakistan has had several periods of martial law in its 50-year independent history and investors feared this might happen again, with negative effects on foreign capital flows.