In mammals, cyclic dinucleotides (CDNs) bind and activate STING to initiate an antiviral type I interferon response. CDNs and STING originated in bacteria and are present in most animals. By contrast, interferons are believed to have emerged in vertebrates; thus, the function of CDN signaling in invertebrates is unclear. Here, we use a CDN, 2'3' cyclic guanosine monophosphate-adenosine monophosphate (2'3'-cGAMP), to activate immune responses in a model cnidarian invertebrate, the starlet sea anemone Nematostella vectensis Using RNA sequencing, we found that 2'3'-cGAMP induces robust transcription of both antiviral and antibacterial genes in N. vectensis Many of the antiviral genes induced by 2'3'-cGAMP are homologs of vertebrate interferon-stimulated genes, implying that the interferon response predates the evolution of interferons. Knockdown experiments identified a role for NF-κB in specifically inducing antibacterial genes downstream of 2'3'-cGAMP. Some of these putative antibacterial genes were also found to be induced during Pseudomonas aeruginosa infection. We characterized the protein product of one of the putative antibacterial genes, the N. vectensis homolog of Dae4, and found that it has conserved antibacterial activity. This work suggests that a broad antibacterial and antiviral transcriptional response is an evolutionarily ancestral output of 2'3'-cGAMP signaling in animals.