President Pervez Musharraf has visited the army headquarters to bid farewell to troops a day before he is due to stand down as head of Pakistan's army.
He will be sworn in as a civilian president on Thursday, his spokesman Rashid Qureshi says.
Gen Musharraf has been under intense international and domestic pressure to give up his military role.
He seized power in a coup in 1999, deposing the civilian government of Prime Minister Nawaz Sharif.
A guard of honour, composed of the army, navy and air force personnel greeted President Musharraf as he arrived at the armed forces headquarters in Rawalpindi, near the capital, Islamabad.
A military band played martial tunes and the national anthem before troops marched past Gen Musharraf, who wore ceremonial dress decorated with medals and a green sash.
Gen Musharraf's growing unpopularity is a cause for concern
After the ceremony, President Musharraf met senior commanders of the three services.
"General Musharraf will make a series of farewell visits to various military headquarters on Tuesday and Wednesday," presidential spokesman Rashid Qureshi was quoted by news agency AFP as saying.
On Wednesday he will be driven to the army's general headquarters to hand over his position as head of the army to his successor, Gen Ashfaq Pervez Kiani.
Gen Musharraf designated Gen Kiani, a former head of the intelligence services, as his successor as army head in October.
The most serious pressure on President Musharraf to give up his uniform has come from the United States, his main international backer.
Washington has grown concerned in recent months at the army's inability to rein in pro-Taleban militants and by Gen Musharraf's growing unpopularity.
It had been backing talks between President Musharraf and former Prime Minister Benazir Bhutto, who heads the country's largest political party, for a power-sharing deal.
As a civilian leader, President Musharraf would still have considerable powers, including the power to sack a civilian government.
He imposed emergency rule on 3 November in order, he said, to rein in the judiciary and deal with a growing threat from Islamist militants.
Thousands of political opponents were arrested, TV and radio news was banned and judges seen to be a threat to the government were sacked.
General elections are to be held on 8 January, but President Musharraf has yet to say when the emergency will be lifted.