Pakistan President Pervez Musharraf has stepped down as army chief, ending eight years of military rule.
Mr Musharraf handed over the baton of the army and its nuclear arsenal to his deputy, General Ashfaq Kiyani, at a farewell parade.
He will be sworn in as civilian president tomorrow.
'After remaining in uniform for 46 years I am saying goodbye to this army. This army is my life, this army is my passion. I have loved this army,' Mr Musharraf said.
The ceremony was broadcast live in Pakistan on television.
Mr Musharraf hailed Pakistan's armed forces as the best in the world and said he had full confidence in Mr Kiyani.
He stated Pakistan's armed forces were an integrating force and are the saviours of Pakistan.
His resignation from the military meets a key demand of the international community that had until recently been happy to back Mr Musharraf as long as he kept up the fight against al-Qaeda and the Taliban.
The former Pakistani premier Benazir Bhutto has welcomed Mr Musharraf’s resignation from the army but said she was in no hurry to accept him as a civilian leader.