Rare species thought extinct is clinging to survival, study finds