In the city of Beni, in the north-east corner of the Democratic Republic of the Congo, an outbreak of Ebola is simmering. Fear of this lethal disease and all that goes with it – grief over lost loved ones, exhausted emergency response workers and ongoing insecurity – might once have felt distant, foreign, unknowable. But, tragically, these emotions are all too familiar.

Almost five years ago, a two-year-old boy from Meliandou – a tiny rural village in southern Guinea, bordering Liberia and Sierra Leone – fell sick with a strange illness. His symptoms were the stuff of nightmares: internal bleeding, black stools, vomiting and a high fever. Just two days later, he died.

At the time, no one in the village knew what the cause of death was; no one could anticipate the chain of consequences that was about to rip through the region and fuel a global panic.

From Meliandou, the disease slipped across Guinea’s porous border and spread unabated through west Africa for four months, before it was correctly identified as Ebola. The world watched in horror as the largest Ebola outbreak in history engulfed my country and the rest of the region, infecting over 27,000 people in total and killing more than 11,000.

Ebola consumed every aspect of daily life. The economy faltered as international trade halted, schools were shut and hard-fought progress on child and maternal mortality was wiped out overnight. Beyond west Africa, isolated outbreaks around the world spread panic and reflected the darker consequences of how interconnected global health has become.

Health workers transport the body of a suspected Ebola victims in Port Loko, on the outskirts of the Serra Leonean capital Freetown, in October 2014. Photograph: Michael Duff/AP

We learned that the world’s health system is only as strong as its weakest link. Investing in primary healthcare is the best way to detect and stop local outbreaks before they become global pandemics.

Local healthcare services are a person’s first and main point of contact with the health system – the place in their community where they can go to see a provider able to address the majority of their health needs. When this primary system is strong, patients develop trusted relationships with their healthcare providers, who can encourage them to seek the care they need, including in times of crisis. Primary healthcare providers are also best positioned to spot the early warning signs of outbreaks – and sound the alarm bell when needed.

In Liberia, we saw that communities with strong primary healthcare were better able to stem the spread of Ebola. We are now applying these lessons to more effectively protect the health of our people should another outbreak strike. We have prioritised investments in primary healthcare to ensure that citizens can secure essential health services free of charge and see primary healthcare providers in their own communities, even in the most remote parts of the country.

Liberia’s national community health assistant programme was launched in July 2016 and will serve more than 4,000 remote communities in the hardest to reach areas of our country by 2021. Each community health assistant is critical to the health of their community, and is trained, paid and supervised to deliver common screening, treatment and preventive health services.

The 3,000 community health assistants deployed to date have identified more than 1,700 warning signs of outbreaks in the past year alone, and have been instrumental in addressing these before they spin out of control. They are critical links to keeping communities across remote Liberia healthy, ensuring that we are better prepared to weather the next storm.

But I know we do not have the complete blueprint to build stronger health systems on our own. Countries must learn from each other – and not just in times of crisis. I am closely watching the work of the primary healthcare performance initiative, which is partnering with country governments to measure the strengths and weaknesses of existing health systems. The initiative’s new “vital signs profiles”, which are launching this week, are designed to help leaders pinpoint opportunities for maximum impact when investing in the systems that guard the health of our people.

West Africa still feels the lasting effects of Ebola, while our brothers and sisters in DRC are working urgently to bring an end to the current outbreak before it spirals out of control. Unless we learn the hard lessons, the global health system will remain like a house without a foundation. Ensuring that everyone, everywhere, has access to essential health services is our best shot at avoiding the all too familiar cycle of health emergencies. Now is the time to act with conviction.

Ellen Johnson Sirleaf is the former President of Liberia