He has previously implored the new government to avoid confrontation.
In civilian role
Dressed in a white sherwani, a traditional South Asian frock coat, Musharraf attended the ceremony for the first time as a civilian to commemorate the day Muslim politicians in the Indian independence movement passed a resolution in 1940 for the country to be founded.
"We are proud that during the past eight years, not only we laid the foundation of a real democracy, but we also put Pakistan on the path of progress and prosperity," he said.
Musharraf further said: "I hope that these governments will maintain political peace ... and will continue the struggle against terrorism and extremism with the same force."
Musharraf came to power in a coup in 1999 but has grown politically isolated since the defeat of his allies in the February 18 general election.
He stepped down as army chief last November, weakening ties with the institution that had been his greatest source of power.
Earlier the MQM, a party that supports Musharraf, withdrew its candidate for prime minster, calling the move a "goodwill gesture".
There had been speculation the PPP would nominate a stop-gap prime minister until Asif Ali Zardari, Bhutto's husband and the party leader, becomes eligible to stand for the post by contesting a by-election in May.
|Musharraf addressed crowds at the |
Pakistan Day military parade [AFP]
Zardari is currently ineligible to stand as he is not a member of parliament.
Gilani was jailed by Musharraf 2001 and released in 2006.
He is expected to win with a big majority when parliament votes on Monday, and he will be sworn in on Tuesday.
Gilani can count on the support of his party, the PPP, which won the most seats in the parliamentary election, and its coalition allies.
He was the "consensus" candidate of the coalition, according to a statement read out in Islamabad by Farhatullah Babar, the PPP spokesman, on Saturday.
Kamal Hyder, Al Jazeera's correspondent in Islamad, said that analysts think Gilani may not have the charisma of Bhutto but that he could prove a good choice for prime minister.
He added that Gilani faced a tough job of overturning an amendment which gives the president the power to dissolve parliament.
"It's a task that will set Gilani and the president on a collision course," Hyder said.