We confronted individually-caged male European starlings, Sturnus vulgaris, with conspecifics of both sexes in order to study singing behaviour during intrasexual and intersexual encounters. Males spent more time at the nestbox, sang more songs and more song types during female presentations than during control periods (observation periods with no conspecifics). Males also sang more songs in the nestbox and flew more to the nestbox with green nest material. During male presentations, only the time spent at the nestbox and the carrying of nest material increased significantly. Males spent more time at the nestbox, sang more songs and more song types in response to a female stimulus than to a male stimulus. Males also sang more songs in the nestbox and flew more to the nestbox with nest material during female than during male presentations. These results suggest that the song and song repertoire of male starlings serve primarily an intersexual rather than an intrasexual function. However, in contrast to a previous study, our results suggest that singing also serves as an intrasexual signal to deter rivals at close encounter. We also tested the hypothesis that the 'whistles' and the 'warbling song' have separate intrasexual and intersexual functions, as has been suggested in the literature. We found no evidence for a specialized intrasexual function of the whistles nor for a specialized intersexual function of the warbling song. From this study it also appears that variations in the size of the aviary can modify the behavioural responses of starling males. New information with regard to the use of green nest material by male starlings is given.