Flaviviruses include the most prevalent and medically challenging viruses. Persistent infection with flaviviruses of epithelial cells and hepatocytes that do not undergo cell death is common. Here, we report that, in epithelial cells, up-regulation of autophagy following flavivirus infection markedly enhances virus replication and that one flavivirus gene, NS4A, uniquely determines the up-regulation of autophagy. Dengue-2 and Modoc (a murine flavivirus) kill primary murine macrophages but protect epithelial cells and fibroblasts against death provoked by several insults. The flavivirus-induced protection derives from the up-regulation of autophagy, as up-regulation of autophagy by starvation or inactivation of mammalian target of rapamycin also protects the cells against insult, whereas inhibition of autophagy via inactivation of PI3K nullifies the protection conferred by flavivirus. Inhibition of autophagy also limits replication of both Dengue-2 and Modoc virus in epithelial cells. Expression of flavivirus NS4A is sufficient to induce PI3K-dependent autophagy and to protect cells against death; expression of other viral genes, including NS2A and NS4B, fails to protect cells against several stressors. Flavivirus NS4A protein induces autophagy in epithelial cells and thus protects them from death during infection. As autophagy is vital to flavivirus replication in these cells, NS4A is therefore also identified as a critical determinant of flavivirus replication.