Both endotherms and ectotherms (e.g., fish) increase their body temperature to limit pathogen infection. Ectotherms do so by moving to warmer places, hence the term "behavioral fever." We studied the manifestation of behavioral fever in the common carp infected by cyprinid herpesvirus 3, a native carp pathogen. Carp maintained at 24 degrees C died from the infection, whereas those housed in multi-chamber tanks encompassing a 24 degrees C-32 degrees C gradient migrated transiently to the warmest compartment and survived as a consequence. Behavioral fever manifested only at advanced stages of infection. Consistent with this, expression of CyHV-3 ORF12, encoding a soluble decoy receptor for TNF-alpha, delayed the manifestation of behavioral fever and promoted CyHV-3 replication in the context of a temperature gradient. Injection of anti-TNF-alpha neutralizing antibodies suppressed behavioral fever, and decreased fish survival in response to infection. This study provides a unique example of how viruses have evolved to alter host behavior to increase fitness.