Aims. To study preflare X-ray brightenings as diagnostics of the destabilisation of flare-associated erupting filaments/prominences. Methods. We combine new observations from the Transition Region and Coronal Explorer (TRACE) and the Reuven Ramaty High Energy Solar Spectroscopic Imager (RHESSI), as well as revisit events reported in the literature to date, in order to scrutinise the preflare activity during eight flare-associated filament eruptions. Results. The preflare activity occurs in the form of discrete, localised X-ray brightenings observed between 2 and 50 min before the impulsive phase of the flare and filament acceleration. These transient preflare brightenings are situated on or near (within 10 of) the polarity inversion line (PIL), coincident with emerging and/or canceling magnetic flux. The filaments begin to rise from the location of the preflare brightenings. In five out of eight events, the preflare brightenings were observed beneath the filament channel, close to the filament footpoint first observed to rise. Both thermal and nonthermal hard X-ray emissions during the preflare enhancement were detected with RHESSI, suggesting that both plasma heating and electron acceleration occurred at this time. The main energy release during the impulsive phase of the flare is observed close to (within 50 of) the preflare brightenings. The fast-rise phase of the filament eruption starts at the same time as the onset of the main flare or up to 5 min later. Conclusions. The preflare brightenings are precursors to the flare and filament eruption. These precursors represent distinct, localised instances of energy release, rather than a gradual energy release prior to the main flare. The X-ray precursors represent clearly observable signatures in the early stages of the eruption. Together with the timing of the filament fast-rise at or after the main flare onset, the X-ray precursors provide evidence for a tether-cutting mechanism initially manifested as localised magnetic reconnection being a common trigger for both flare emission and filament eruption.