In a food-rewarded two-alternative forced-choice procedure, it was determined how well the weakly electric elephantnose fish Gnathonemus petersii can sense gaps between two objects, some of which were placed in front of complex backgrounds. The results show that at close distances, G. petersii is able to detect gaps between two small metal cubes (2 cm × 2 cm × 2 cm) down to a width of c. 1·5 mm. When larger objects (3 cm × 3 cm × 3 cm) were used, gaps with a width of 2–3 mm could still be detected. Discrimination performance was better (c. 1 mm gap size) when the objects were placed in front of a moving background consisting of plastic stripes or plant leaves, indicating that movement in the environment plays an important role for object identification. In addition, the smallest gap size that could be detected at increasing distances was determined. A linear relationship between object distance and gap size existed. Minimal detectable gap sizes increased from c. 1·5 mm at a distance of 1 cm, to 20 mm at a distance of 7 cm. Measurements and simulations of the electric stimuli occurring during gap detection revealed that the electric images of two close objects influence each other and superimpose. A large gap of 20 mm between two objects induced two clearly separated peaks in the electric image, while a 2 mm gap caused just a slight indentation in the image. Therefore, the fusion of electric images limits spatial resolution during active electrolocation. Relative movements either between the fish and the objects or between object and background might improve spatial resolution by accentuating the fine details of the electric images.