Pili are required for protein and/or DNA transfer from bacteria to recipient plant or bacterial cells, based on genetic evidence. However, it has never been shown directly that the effector proteins or DNA are localized along or inside the pili in situ. Failure to visualize an association of effector proteins/DNA with pili is the central issue in the debate regarding the exact function of pili in protein and DNA transfer. In this study, a newly developed in situ immunogold labelling procedure enabled visualization of the specific localization of type III effector proteins of Erwinia amylovora and Pseudomonas syringae pv. tomato along the Hrp pilus, but not along the flagellum or randomly in the intercellular space. In contrast, PelE, a pectate lyase secreted via the type II protein secretion system, was not associated with the Hrp pilus. These results provide direct evidence that type III secretion occurs only at the site of Hrp pilus assembly and that the Hrp pilus guides the transfer of effector proteins outside the bacterial cell, favouring the 'conduit/guiding filament' model.