Context. Very long baseline interferometry (VLBI) data are extremely sensitive to the phase stability of the VLBI array. This is especially important when we reach µJy rms sensitivities. Calibration using standard phase-referencing techniques is often used to improve the phase stability of VLBI data, but the results are often not optimal. This is evident in blank fields that do not have in-beam calibrators.Aims. We present a calibration algorithm termed multi-source self-calibration (MSSC) which can be used after standard phase referencing on wide-field VLBI observations. This is tested on a 1.6 GHz wide-field VLBI data set of the Hubble Deep Field North and the Hubble Flanking Fields. Methods. MSSC uses multiple target sources that are detected in the field via standard phase referencing techniques and modifies the visibilities so that each data set approximates to a point source. These are combined to increase the signal to noise and permit self-calibration. In principle, this should allow residual phase changes caused by the troposphere and ionosphere to be corrected. By means of faceting, the technique can also be used for direction-dependent calibration. Results. Phase corrections, derived using MSSC, were applied to a wide-field VLBI data set of the HDF-N, which comprises of 699 phase centres. MSSC was found to perform considerably better than standard phase referencing and single source self-calibration. All detected sources exhibited dramatic improvements in dynamic range. Using MSSC, one source reached the detection threshold, taking the total detected sources to twenty. This means 60% of these sources can now be imaged with uniform weighting, compared to just 45% with standard phase referencing. In principle, this technique can be applied to any future VLBI observations.