The silk fibre is secreted by the silkworm larva just before it enters the pupal stage. The larva spins a cocoon around itself using this silk thread. The cocoon serves as a protective casing for the pupa. The cocoon, which is the fibre of commerce, is harvested when the insect is in the pupal stage inside the cocoon.