The present invention is directed to a method and composition of treating or preventing viral infections, in particular, human immunodeficiency virus (HIV) and hepatitis B virus (HBV) infections, in human patients or other animal hosts, comprising the administration of N.sup.4-acyl-2′,3′-dideoxy-5-fluorocytidine or N.sup.4-acyl-2′,3′-didehyd-ro-2′,3′-dideoxy-5-fluorocytidine, and pharmaceutically acceptable salts, prodrugs, and other derivatives thereof.