In April 1914, as Europe was moving towards war, Dakar, the capital of present-day Senegal, was hit by an epidemic of bubonic plague that within a year, according to one account, wiped out nearly 15 percent of the city's population.

In response, the French colonial authorities imposed harsh measures on the African population, which included restrictions on movement, the establishment of quarantine camps, forceful vaccinations and the burning of homes. The epidemic was part of what has come to be known as the Third Plague Pandemic that circled the globe between 1855-1959, during which European administrators across Africa implemented similar measures in other colonial cities. Nairobi's business district, for example, was razed down following an outbreak in 1902.

Plague epidemics on the continent had predated the arrival of the Europeans, and Africans were not unaware of the dangers they posed. Still, in places like central Kenya, plague was not a significant cause of African morbidity and mortality. Colonial medical officials were, however, concerned about the threat epidemics posed to the extractive colonial economy, the flow of migrant labour from Africa to Europe and production in cash-crop growing areas. The measures they imposed on the locals were unpopular, and Africans quickly became loath to cooperate with the colonial authorities or to report cases in their homesteads knowing it meant the destruction of their homes. More than a century later, a similar dynamic is at work as the world confronts yet another pandemic.

Since it was first identified in China in late December, the coronavirus has swept across the world, killing thousands and wreaking social and economic havoc on a massive scale. Disregarding the advice of the World Health Organization (WHO) as well as global health experts, many countries have resorted to imposing travel restrictions, the latest being the sweeping US ban on all travel from Europe.

African governments too have been scrambling to contain the virus before it establishes a firm toehold on the continent. As is the case in much of the rest of the world, initial fears and efforts focused on the possibility of importing COVID-19 from China. Across the continent, air links with China have been severed and, in some countries such as Kenya, this has led to a spike in racist anti-Chinese sentiment. Yet as publics and governments were looking east, the virus sneaked in from an entirely different direction.

As of this week, at least 18 African countries, 14 of them in sub-Saharan Africa, have so far reported a combined total of almost 200 coronavirus cases. The majority of infections outside Egypt, where there are the most reported cases but where the source of the virus is disputed, originated in Europe. In Burkina Faso, which was the latest to confirm the presence of the virus, a couple was quarantined after returning from a trip to France. Nigeria was introduced to the virus by a 44-year old Italian while the cases in Cameroon and Togo involved people who had been travelling in Europe. In fact, according to the WHO, Europe is now the "epicentre" for the pandemic, reporting more daily cases than China did at the height of its outbreak.

For a continent with long historical ties to Europe, measures such as indiscriminate travel bans will be difficult to swallow, akin to burning down the house. For example, according to a report by the Kenyan government, arrivals from Europe last year dwarfed those from China, with five arrivals from the Old Continent for every one from the People's Republic. In fact, arrivals from Europe were double those from Asia and the Middle East combined and accounted for 45 percent of visitors to Kenya from the top 12 countries outside the African continent. Given that two-thirds of international visitors to Kenya came to holiday, pumping $1.6bn into the local economy, and helping to sustain over a million jobs, a strategy of shutting the doors to Europe begins to look rather unappealing.

Of course, this has not stopped some countries from trying. Uganda has asked Italians, Spaniards, Germans and the French not to come and has also banned international conferences on its soil including the United Nations Group of 77 and China Summit, which had been expected to attract more than 6,000 delegates. Across the border, Kenya has issued a similar ban, which will mean foregoing much-needed income for the region's economies.

Yet questions linger over the sustainability of travel bans for a continent where travel and tourism remain one of the key drivers of growth. Although Africa captures a tiny fraction of the global tourism market, the industry still accounted for 8.5 percent of the continent's gross domestic product in 2018 and employed over 24 million Africans. With the virus now present in over 115 countries, the Kenyan transport minister has noted the impossibility of stopping flights from them all.

The decision by the WHO to declare COVID-19 a global pandemic is itself an admission that containment efforts have failed. Last week, WHO officials had said that declaring a pandemic would be tantamount to throwing in the towel on containment and would be a signal to governments that efforts should focus instead on mitigation: treating patients, developing and providing vaccines and reducing the strain on health systems and society.

For African countries, it should be treated as a caution against wrecking an important source of livelihoods by imposing indiscriminate travel bans. That does not mean abandoning reasonable precautions to stop infected persons getting into the continent, but rather changing focus to ramping up capacity for free testing for the virus, shoring up dilapidated health systems to deal with local infections, and, importantly, public education - measures that some countries are now implementing.

However, huge gaps remain. At a press briefing on Friday to announce Kenya's first confirmed case, the Cabinet Secretary for Health offered contradictory advice, alternately asking the sick to stay at home and then later saying the responsible thing was actually to head to the hospital. The panic buying that followed the announcement exemplified a lack of faith in the government's ability to manage the epidemic driven largely by its failure in the preceding weeks to prepare the population for what was coming.

The continent could look to Asian countries such as Singapore and South Korea, where public information coupled with widely available free testing and contact tracing as well as rigorously enforced isolation of infected cases has minimised the need for Italian-style shutdowns.

Africa can beat COVID-19. It just doesn't need to burn down the house to do it.

The views expressed in this article are the author's own and do not necessarily reflect Al Jazeera's editorial stance.