The attachment pads of fly legs are covered with setae, each ending in small terminal plates coated with secretory fluid. A cluster of these terminal plates contacting a substrate surface generates strong attractive forces that hold the insect on smooth surfaces. Previous research assumed that cohesive forces and molecular adhesion were involved in the fly attachment mechanism. The main elements that contribute to the overall attachment force, however, remained unknown. Multiple local force-volume measurements were performed on individual terminal plates by using atomic force microscopy. It was shown that the geometry of a single terminal plate had a higher border and considerably lower centre. Local adhesion was approximately twice as strong in the centre of the plate as on its border. Adhesion of fly footprints on a glass surface, recorded within 20 min after preparation, was similar to adhesion in the centre of a single attachment pad. Adhesion strongly decreased with decreasing volume of footprint fluid, indicating that the layer of pad secretion covering the terminal plates is crucial for the generation of a strong attractive force. Our data provide the first direct evidence that, in addition to Van der Waals and Coulomb forces, attractive capillary forces, mediated by pad secretion, are a critical factor in the fly's attachment mechanism.