Officials in Havana have claimed the shooting began to prevent “infiltrators” on board from entering the country “for the purposes of terrorism”.