Drosophila are tolerant of high levels of dietary salt and can provide a useful model for studies of the physiology of salt stress. The effects of NaCl- and KCl-rich diets on haemolymph ionoregulation and Malpighian tubule (MT) fluid secretion, Na+ and K+ secretion and transepithelial potential were examined in larval and adult Drosophila melanogaster. K+ concentrations in the haemolymph of adults reared on the KCl-rich (0.4 mol l–1) diet did not differ from the values for insects reared on the control diet. In the haemolymph of larvae reared on the K-rich diet, K+ concentrations increased from 23 to 75 mmol l–1 after 6 h, then returned to the control value within 48 h. Na+ concentrations in the haemolymph of adults or larvae reared for 1–7 days on the NaCl-rich (0.4 mol l–1) diet increased by ∼50% relative to values for insects reared on the control diet. Rates of secretion of fluid, Na+ and K+ by MTs isolated from larvae reared on the Na-rich diet for >6 h and bathed in control saline containing 20 mmol l–1 K+ did not differ from the values for tubules of larvae reared on the control diet. Evidence of phenotypic plasticity was seen in the response of MTs isolated from larvae reared on the K-rich diet for >6 h and bathed in saline containing 60 mmol l–1 K+; secretion of fluid and K+ increased by >50% relative to the values for tubules of larvae reared on the control diet. Secretion of fluid, Na+ and K+ increased when tubules were bathed in haemolymph collected from larvae reared on the Na- or K-rich diets. Secretion was further increased by addition of exogenous cAMP but not by addition of thapsigargin to the haemolymph. The results show that haemolymph ionoregulation in larvae reared on salt-rich diets involves both alterations in the basal secretion rates of Na+ and/or K+ as well as stimulatory effects of diuretic factors present in the haemolymph. The results suggest that such factors stimulate tubule fluid and ion secretion through increases in intracellular Ca2+ in response to salt stress.