The observation that gleaning bats detect prey by its noises, together with difficulties in recording their faint sonar calls, have led some authors to conclude that gleaning bats may not use echolocation in certain hunting situations. In particular, it is conjectured that echolocation plays no role in the classification and tracking of prey. In the present study, we show that the gleaning bat, Megaderma lyra, is able to find silent and motionless prey on the ground. The significance of sonar for catching a variety of terrestrial prey is established in a standardized situation. Sonar calls were found to be emitted during all stages, i.e. approach, hovering above the prey, and return to the roost, of every hunting flight. The harmonic pattern of the calls differed significantly between these stages, calls with three or more prominent components prevailing during hovering. Bats identified prey and rejected dummies while hovering above them. During this stage, increased call rates and reduced call durations were found. Echolocation activity during, and the duration of, the hovering phase depended on prey type, in particular on prey movement. The prey-dependent shifts in sonar activity, the broadband call structure with an emphasis on higher harmonics, and a systematic shift of the calls' peak frequencies during hovering, are discussed as adaptations to identifying prey by sonar.