With a weak healthcare system, large population and many poorer families living in crowded living conditions, Pakistan seemed in danger from the outset of a catastrophic toll from coronavirus.
The danger appeared to increase in June, when doctors in major cities reported that their hospitals were overwhelmed with patients. Intensive care units in the largest hospitals filled up, and families were forced to shuttle relatives around in the search for a bed.
But just a few weeks later, hospital admissions appeared to fall drastically.
Many doctors were initially sceptical, wondering if conspiracy theories about patients being "poisoned" by medics had led to a rise in families "self-treating" at home. But the decrease has been sustained.
Now, life in Pakistan is getting largely back to normal, and the last vestiges of partial lockdown restrictions are being lifted. Restaurants have reopened. Only schools and universities, along with marriage halls, remain shut until next month.
With around 6,000 coronavirus deaths in a population of approximately 230 million people, Pakistan appears to have fared far better than most Western countries. The UK, for example, has recorded more than 41,000 deaths in a population of around 67 million. Cities in neighbouring India, such as Delhi and Mumbai, seem to have been worse affected.
And Pakistan's apparent success seems to come in spite of Prime Minister Imran Khan's repeated opposition to lockdown measures, which he warned would lead to "starvation" in the country.
The question is, can the data from Pakistan be trusted?
Testing has been relatively low, and numbers are in fact decreasing. There are certainly many more coronavirus cases than the roughly 290,000 officially recorded, but the recorded drop in infections is substantiated by the fact that the proportion of tests that come back as positive has also been decreasing, as have hospital admissions.
Data obtained by the BBC from officials in the country's two largest cities, Karachi and Lahore, show that there was a significant rise in graveyard burials in June that can't be explained by coronavirus deaths alone.
For example, in Miani Sahib graveyard, the largest in Lahore, in June 2020 there were 1,176 burials this June, compared to 696 in June last year.
Only 48 of the burials this June were of officially recorded coronavirus patients. The rise is likely to be a combination of undetected coronavirus deaths, and patients suffering from other illnesses not getting treatment as hospitals were under such pressure.
Similarly, in Karachi, June 2020 saw significantly more burials than at any other time during the past two years.
However, in both cities burial figures appear to be returning to more normal rates. Even if some of the "excess deaths" are assumed to be the result of coronavirus, by international standards the mortality rate in Pakistan appears to be relatively low, though not quite as low as official data would suggest.
For leading Pakistani epidemiologist Dr Rana Jawad Asghar, the principal reason for this is Pakistan's young population. The average age in Pakistan is 22 years, compared to about 41 in the UK. The vast majority of deaths globally from the coronavirus have been of elderly patients.
Dr Asghar told the BBC that less than 4% of Pakistan's population is aged 65 and above, whereas in more developed countries the proportion is around 20-25%. "That is why we haven't seen that many deaths in Pakistan," he said.
Another factor, Dr Asghar said, was that social circles in developing world countries are smaller than the West.
"Once a virus has run out of those social circles which are intermixing, it basically dies down," he said.
As yet, theories that hotter climates, or prior exposure to other diseases, have contributed to coronavirus being less deadly remain unproven.
In Pakistan, the decrease in coronavirus cases began around the same time the government began implementing "smart" or targeted lockdowns, in areas where localised outbreaks had occurred. But residents reported that these lockdowns were not particularly strict, nor the compliance with them.
Dr Mishal Khan, a social epidemiologist from the London School of Hygiene and Tropical Medicine, told the BBC that there were signs of "greater awareness" in Pakistani society, but added, "that isn't likely to be the whole picture".
While differences in population demographics and social behaviour patterns might explain why Pakistan has fared better than the West, it's less clear why the situation hasn't been more similar to that across the border in India. There, although the number of deaths per million across the country is comparable to the rate in Pakistan, hospitals have come under even greater pressure and cases are continuing to rise.
One theory is that there are more large, densely populated cities in India. Professor K Srinath Reddy, of the Public Health Foundation of India, noted that infections had levelled off in both Mumbai and Delhi, but were increasing in other parts of the country. Dr Asghar warned that it was too early to make comprehensive comparisons, given concerns about mortality data.
In Pakistan, the dangers of a new surge in cases still exist. According to a study in the country's worst affected city, Karachi, in July by pharmaceutical company Getz Pharma, around 17.5% of the population is estimated to have been exposed to coronavirus. That means significant swathes could still contract it.
With large numbers of domestic tourists leaving Pakistan's major cities, heading for rural areas, following the lifting of restrictions, there are particular concerns the virus could spread to less developed areas, where there is even less healthcare and surveillance.
Dr Asghar told the BBC that tracking systems needed to be improved in order to detect new spikes in cases. The fact that Pakistan had so far done better than feared "does not mean we are out of danger", he said.