The yellow fever outbreak in Africa this year came closer to being a disaster than is widely recognized, public health experts recently disclosed. The epidemic also revealed glaring weaknesses in the emergency vaccine supply pipeline.

The first deaths in Angola were misdiagnosed as food poisoning; the global emergency vaccine stockpile was depleted before even one city was fully protected; and diagnostic laboratories were so far away that it was months before the scope of the outbreak was clear and a worldwide alarm was raised.

Ultimately, the yellow fever outbreak was halted only by a huge vaccination campaign that stretched supplies by diluting doses, and even that succeeded only because some unusual donors stepped in.

Brazil contributed 18 million doses of yellow fever vaccine — three times the amount in the emergency stockpile — to contain the African outbreak. Even South Sudan, one of the world’s poorest nations, gave up 400,000 doses intended for its children.