MAE SAI, Thailand (AP) — All 12 boys and their soccer coach have been rescued from a flooded cave in northern Thailand, the Thai navy SEALs said Tuesday, ending an 18-day ordeal that riveted people around the world.

The SEALs, who were central to the rescue effort, said on their Facebook page that the remaining four boys and their 25-year-old coach were all brought out safely Tuesday. Eight of the boys had been brought out of the cave by a team of Thai and international divers on Sunday and Monday.

“We are not sure if this is a miracle, a science, or what. All the thirteen Wild Boars are now out of the cave,” the SEALs said, referring to the name of the boys’ soccer team.