When doctors concluded last month that a new type of flu virus had killed a Saudi man and infected a recent visitor to the kingdom from Qatar, public health experts immediately recalled an autumn day in Rome three years earlier.
The organisers of the world's biggest events had convened at the headquarters of the World Health Organisation (WHO). No logistical challenge had proven too daunting to these veteran planners - the World Cups of football and cricket, for example. Catholic World Youth Day. The Olympic Games in Sydney, Beijing and Vancouver.
On this occasion, however, a potential catastrophe loomed. The Haj, the annual pilgrimage to Mecca that was just a few weeks away, risked becoming a vehicle for the worldwide spread of a deadly strain of influenza.
Saudi Arabia, WHO and the other participants who convened in Rome had been working for months to develop guidelines and procedures to make sure that did not happen.
And they rose to the occasion. The Haj took place without so much as a spike in the number of influenza cases. Out of 1.6 million pilgrims to Saudi Arabia that year, 919 died, mostly from cardiovascular or other chronic diseases. Worldwide, the H1N1 influenza virus killed 18,000.
How Saudi Arabia pulled off such a feat can be summed up in one word: surge. Every year, the kingdom spends hundreds of millions of dollars to deploy a small army of medical professionals to the pilgrimage, in what is easily the world's largest - and arguably most successful - experiment in public health.
This year will be no different. With the emergence of the new virus, the Saudi authorities have stepped up monitoring at points of entry to the country and reinforced their messages about washing hands to prevent respiratory disease.
To the hosts of the world's largest migration, it is a minor episode in a long history of dealing with disease, from cholera to pneumonia to plague. The Haj serves as a model for similarly large events.
In the year of the H1N1 pandemic, the Saudi ministry of health sent 17,886 health professionals to staff 14 permanent and seven seasonal hospitals, plus nearly 200 health centres in Mecca and Medina. Tens of thousands of pilgrims were vaccinated or put on preventive medication on arrival.
"To cut a long story short, the Saudis had very impressive management of the 2009 epidemic - so much so that there was very little talk after the event," said Dr Shuja Shafi, a retired medical researcher and the deputy secretary general of the Muslim Council of Britain. "People only talk when something goes wrong."
The first time the world talked about health at the Haj - almost 200 years ago - something had gone wrong. Beginning in the 1830s, a wave of cholera epidemics had hit Haj pilgrimages.
In 1865, cholera killed 15,000 pilgrims - but that only foreshadowed the full extent of tragedy. Many of the pilgrims carried the disease home with them. By the time the epidemic subsided, 60,000 Egyptians and 200,000 Europeans had died.
"Europe realised that it could not remain like this, every year, at the mercy of the pilgrimage to Mecca," the Paris-based scientist Achille Proust wrote in 1873.
As the pandemic abated, a series of international conferences set out to tackle the threat of epidemic during the Haj. By the 1880s, South Asian pilgrims had to pass through a Yemeni island for quarantine, and boats had health inspectors on board.
"They sent out commissions, looked for quarantine sites and asked some basic water-safety questions," said Michael Low, a graduate student at Columbia University who studies the history of epidemics during the Haj.
In the decades that followed, the international response solidified. The League of Nations and then the United Nations helped with the quarantine management.
By the time Saudi Arabia's ministry of health assumed full control of operations in 1957, a worldwide network was in place to monitor the annual event. Today, the Haj remains at the heart of public-health efforts - most recently as a model for a new scientific field: mass-gathering medicine, defined in 2010 as any event requiring a surge of medical capacity.
This year's surge, when the Haj begins at the end of this month, will involve 22,000 Saudi-employed staff and 150 health facilities. More than a million health brochures in five languages have been distributed. One hospital in Mecca literally folds up when the event is over - only to be reopened the next year.
"The health infrastructure for Haj has expanded significantly over the years," said Dr Ziad A Memish, Saudi's deputy minister for public health and one of the most prolific scientists to publish on mass- gathering medicine.
Pilgrims are required to show a host of vaccination documents, for diseases such as meningitis, yellow fever and influenza, before they obtain visas, as well as when they arrive. Anyone failing to do so is given the vaccination upon arrival.
Maurizio Barbeschi, an expert on mass-gathering medicine at WHO, said he was not worried about the virus threatening this year's Haj.
"Are the Saudis ready for this year? The answer is that they cannot be more prepared, because everything they've learnt in past years has been incorporated," he said.
"They are the best possible given the knowledge they have."