A bag of flour helped four children survive in the Amazon for almost seven weeks after a plane crash that killed all the adult passengers.

The indigenous Huitoto children, ages 13, 9, 4 and 11 months, were treated at a hospital in Bogota, Colombia, where they were visited this weekend by family members, military officials and even President Gustavo Petro, who predicted that the their epic story of survival “will go down in history”.

“When the plane crashed, they took a bag of flour from the wreckage and with that, they survived,” the children’s uncle, Fidencio Valencia, told reporters gathered outside the hospital on Saturday.

The flour was made from cassava, a flour commonly consumed in the region.

“After it was over, they started eating seeds” from plants they knew, Valencia said.

The eldest child, Lesly Mucutuy, used her grandmother’s knowledge to build a camp in the desert using hair ribbons while choosing other safe foods for her siblings, relatives said.

“When we played, we set up like little camps,” the children’s aunt, Damaris Mucutuy, told Colombian news agency Caracol TV.

Lesly “knew what fruit she cannot eat because there are many poisonous fruits in the forest. And she knew how to take care of a baby,” said the aunt.

Despite being dehydrated and full of bug bites, “the kids are fine” and are being visited by social workers and tribal musicians, Mucutuy said.

The children were found Friday 3 miles from the crash site — 40 days after the single-engine Cessna plane crashed due to mechanical failure.

The impact killed the mother of the two adults who were on board.