Bacterial infections are one of the most important problems in mass aquaculture, causing the loss of millions of juvenile organisms. We isolated 22 bacterial strains from the cavity fluid of the sea urchin Strongylocentrotus pallidus and used phylogenetic analysis based on 16S rRNA gene sequences to separate the bacterial strains into 9 genera (Aliivibrio, Bizionia, Colwellia, Olleya, Paenibacillus, Photobacterium, Pseudoalteromonas, Shewanella, and Vibrio). Incubating Strongylocentrotus intermedius larvae with a strain from each of the 9 bacterial genera, we investigated the viability of the larvae, the amount of pigment cells, and the level of polyketide synthase (pks) and sulfotransferase (sult) gene expression. Results of the assay on sea urchin development showed that all bacterial strains, except Pseudoalteromonas and Bizionia, suppressed sea urchin development (resulting in retardation of the embryos' development with cellular disorders) and reduced cell viability. We found that pks expression in the sea urchin larvae after incubation with the bacteria of 9 tested genera was significantly increased, while the sult expression was increased only after the treatment with Pseudoalteromonas and Shewanella. Shikimic acid, which is known to activate the biosynthesis of naphthoquinone pigments, increased the tolerance of the sea urchin embryos to the bacteria. In conclusion, we show that the cell-specific pigment genes pks and sult are involved in the bacterial defense response of sea urchins.