But when they saw him walking on the sea,.... See Gill on Mat 14:26;
they supposed it had been a spirit; a phantom, a spectre, an apparition, a nocturnal demon:
and cried out; as men affrighted at the sight, and fearing they should be hurt by it, or that it portended some evil to them; See Gill on Mat 14:26.