Aspects of the biology of Cystiphora sonchi (Bremi) (Diptera: Cecidomyiidae) were investigated and releases were made on perennial sow-thistle (Sonchus arvensis L.) (Compositae) in six provinces of Canada. Fecundity, determined by dissection of newly emerged females, averaged 86.2 eggs. Cystiphora sonchi became established in Alberta, Saskatchewan, Manitoba, and Nova Scotia, and produced three generations at Vegreville, Alberta. In fall, mature larvae enter the soil, and most can pupate in temperatures of 4 °C. The gall fly thrives in shady and sunny locations. Cattle caused considerable fly mortality by feeding on galled leaves of perennial sow-thistle. Extremely dry or moist soils reduced the number of adults that emerged from pupation and extremely moist soils increased the lengths of the pupation periods. Flooding caused greater mortality of pupae than of larvae but 2% of the larvae survived flooding up to 8 weeks.