abstract: We demonstrate, in numerical simulations of the nonlinear Schroedinger equation, the spontaneous formation of vortex spirals, links, and knots in the field of a perturbed optical spatial soliton. The analysis based on internal modes of solitons in the medium with Kerr-type saturable nonlinearity shows that proper superposition of the monople and quadrupole modes is responsible for wave knotting.