but when that ship returning at last out of the deep ocean foundered in the great storm within sight of the coasts of middle-earth , ulmo took him up , alone of all its mariners , and cast him onto the land near vinyamar ; and learning of the command laid upon tuor by the lord of waters voronwe was filled with wonder , and did not refuse him his guidance to the hidden door of gondolin .