The invention provides a water-based composition for treating an infection by a dermatophyte fungus comprising econazole or a pharmaceutically acceptable salt thereof. Also provided are methods of treatment utilizing the water-based foam composition, as well as its preparation.