Genetic algorithm-based RNA secondary structure prediction was used in combination with comparative sequence analysis to construct models of folding for the distal part of the 3'-untranslated region of flaviviruses belonging to four serological groups. Elements of RNA secondary structure that are preserved among all the flaviviruses studied were revealed, despite the high degree of sequence divergence between them. At the same time, structural elements were observed that distinguish members of different serological groups and, in particular, a region of remarkable structural divergence between the tick-borne and mosquito-borne flaviviruses was found. Application of the genetic algorithm also revealed that the 3'-terminus of flaviviral genomic RNA may take on alternative conformations, which are not observed in the 3'-terminus of complementary minus strand RNA. These alternative folding patterns may have roles in the regulation of transcription and translation initiation and in the switch between them.