A message posted on the website of the US Embassy in Islamabad said: "Terrorists may wish to take advantage of the upcoming Pakistan Independence Day celebrations (August 13 and 14) and Eid-ul-Fitr (approximately August 19, 20 and 21) to initiate attacks."
The message said it was "especially important that US citizens and US Embassy personnel continue to maintain good situational awareness, avoid crowds and public places, and keep a low profile during this time".
This message was aimed at alerting US citizens to the "continued potential danger to US citizens posed by the presence of al Qaida, Taliban elements, and indigenous militant sectarian groups in Pakistan".
"Threat reporting indicates these groups continue to seek opportunities to attack US Mission personnel, US citizens and other Westerners, especially at locations where they are known to congregate," the message said.
The US Embassy asked its personnel to avoid markets and any unnecessary travel during Independence Day and Eid-ul-Fitr.
It also encouraged Americans to register with the Smart Traveler Enrollment Program, which will keep them up to date with important safety and security announcements.
Pakistan has witnessed a sharp increase in anti-American sentiments since the unilateral US military raid that killed Osama bin Laden in the garrison town of Abbottabad in May last year.