Ceremonies in Pakistan to mark the 60th anniversary of independence are drawing to a close as India prepares similar celebrations for Wednesday.
This year's events across Pakistan were more low-key because officials said that heavy security was needed to deal with the threat of militant violence.
In Islamabad there were no official large-scale public parades or events.
Instead a ceremony before an invited audience at a convention centre was broadcast live to the nation.
The BBC's Dan Isaacs in Islamabad says that one reason for the muted public celebrations has been concern for public safety.
There were smiles despite the security
A flag-raising ceremony in the eastern city of Lahore was cancelled for security reasons and the provincial government there issued a public warning that suicide bombers may be planning attacks on high-profile Independence Day events.
People were advised not to attend large gatherings.
But security issues aside, our correspondent says that this has been a day of national pride, and despite its turbulent history Pakistan has achieved significant strides in economic progress over the past six decades.
In Islamabad, 31 artillery guns fired at daybreak in a ceremony full of military pomp.
Soldiers resplendent in colourful uniforms changed the guard at the domed mausoleum of Pakistan's first leader, Mohammed Ali Jinnah, in Karachi.
More flag-raising ceremonies and 21-gun salutes occurred in all four provincial capitals, while green and white colours and bunting were on display in homes, cars and shops throughout the country.
Correspondents say that away from the official ceremonies, many markets and streets were deserted - with only security forces in attendance.
"People are really scared of bomb blasts and suicide attacks and that is why they are not coming to markets," Muhammad Nawaz, a balloon seller waiting for customers in the central Jinnah market told the AFP news agency.
The recent storming Islamabad's radical Red Mosque - combined with subsequent suicide bombings - has made many people feel there is little to celebrate.
The anniversary still contained the usual pomp and pageantry
Such sentiments were seemingly at odds with the joy expressed by cheering revellers who poured onto the streets in Islamabad overnight in cars and motorcycles festooned with Pakistani flags. Firecrackers boomed despite driving monsoon rains.
"We feel proud of this day and we celebrate it with full love and affection with our country. We want to see Pakistan progressing, and to curtail the terrorism which blights our country," one reveller told the BBC.
Meanwhile India has deployed aircraft, troops and tens of thousands of security forces on the eve of its 60th anniversary celebrations.
The government has warned that the country faces new threats from al-Qaeda and separatist rebels.
In Delhi, some 70,000 policemen and paramilitary troops are being posted at government buildings, diplomatic enclaves and main intersections.
Prime Minister Manmohan Singh is due to launch the celebrations on Wednesday with a speech from on top of the city's 16th-century Mughal Red Fort, which has already been sealed off to the public.