In a country where any mosque could be a target of a suicide bomb attack, attending early morning Eid al-Fitr prayers is a step into self-doubt.

In a 300-person capacity mosque in Rawalpindi, soldiers carrying machine guns are posted on all four sides of the mosque in this compound of low-rise apartment blocks, an affluent subdivision called Askari 3. At a time that should bring exuberance and release after a month of fasting, worshippers are greeted with a frisking before they enter.

But security forces across Pakistan are being overpowered at mosques, prisons and police stations in the run-up to an Eid holiday that has taken on a distinctly sombre mood.

Story continues below advertisement

A bloody Ramadan – in which nearly 100 people were killed in a dozen suicide attacks or targeted killings – saw no relenting. Not even Eid would be respected. Friday morning, gunmen attacked worshippers at a mosque in Quetta as they finished their early prayers, leaving nine dead – the second straight day a mosque in Quetta has been targeted.

In the capital, Islamabad, a suicide bomber's vest failed to detonate and in the ensuing shootout the bomber and a mosque security guard were killed.

Later in the day, I headed out from Rawalpindi to Islamabad, which takes an hour in traffic. But it was like driving on Christmas Day on the deserted road and the trip only took a half-hour.

At Faisal Mosque – Islamabad's iconic building with its Bedouin-tent shaped structure and four towering minarets against the backdrop of the Margalla Hills – the police are also there, standing under the shade of trees.

Story continues below advertisement

Worshippers walk along the outdoor marble floor tentatively, like they are walking on fiery coals. Inside the cavernous, red-carpeted hall – with a massive ball-shaped chandelier – the message from the imam after Friday prayers is approaching desperation.

"O Allah, we are in fear. … Bring peace to our nation," he said, to a loud ameen – or amen – from a congregation of mostly men.

Turning on the TV these days to more than a dozen news channels, there is no telling where terrorists will strike next. I have watched elderly relations crying at the latest suicide attack death toll reported by breathless reporters.

To many Pakistanis, the current government – led by Prime Minister Nawaz Sharif and sworn-in more than two months ago – heralded a new chapter and an opportunity to tackle terrorism.

Story continues below advertisement

But the violence carried out by the Pakistan Taliban, sectarian militants and insurgents has spiralled out of control. Pakistanis are painfully aware: The government has no counterterrorism strategy and police are powerless.

A soft-spoken retired soldier with a tightly cropped beard, Akhtar Hussain volunteered to work overtime holiday shifts driving clients.

"Our security apparatus is not very good," said Mr. Hussain, during the 30-minute drive to Islamabad.

"I mean, how are [the terrorists] able to attack within a police-controlled area?" he wondered, referring to an attack in Quetta on Thursday in which a suicide bomber killed dozens – many of them police – at a mosque funeral service for a police officer slain earlier in the week.

Story continues below advertisement

In Islamabad's streets and markets midafternoon, the shops were shuttered and the streets quiet – another typical Eid day in the nation's capital. In the evening, the city will come to life as people pile in to restaurants, the smell of flame-grilled kebabs in the air.

Outside the Faisal Mosque, families and young men walked across its green lawns to the main prayer area past a gauntlet of food sellers carrying baskets of snacks. With Pakistan's security challenges so immense and confounding, many ordinary Pakistanis choose to leave it in higher hands and carry on.

"Our country's situation is really terrible," lamented Shahid Iqbal, who was selling roasted lentil snacks in newspaper cones for the equivalent of 10 cents. "Allah will fix it," he added.