A unique lag-based VLBI correlator system has been developed for the purpose of supporting both S2-based Space VLBI observations in the Japanese-led VSOP mission and the Canadian Geodetic VLBI program. The system architecture has been designed so that replication of a small number of modules can be used to construct systems with a wide range of sizes. Optimized for a large correlator, the design is 'station-based' in the sense that as many hardware and software functions as possible are performed before data is replicated and transmitted for baseline (station pair) processing. As well as delay compensation and generation of phase rotation coefficients, station-based functions include autocorrelation, tone extraction, pulsar gating, signal-statistics accumulation, and digital filtering. Doppler shift correction (fringe stopping) is performed on a baseline basis at each correlator lag so that there are no smearing effects (lag-dependent loss of coherence) or frequency shifts that must otherwise be corrected after correlation. This is a key element that simplifies the baseline processing architecture when high accelerations associated with an orbiting antenna must be considered. Flexible, efficient distribution of data from station-based hardware to baseline-based hardware is accomplished by serializing the wide data paths to 1 Gbit/s signals and using high-speed switches to route the signals to their final destinations where they are de-serialized before cross-correlation. This greatly reduces the size, wiring complexity, and cost of the system. The interval between updates of the delay models, integration times, and other important events is typically 10 ms, but can be as short as 1 ms. Within this period, delay and fringe model generation is performed using linear hardware synthesizers. The correlator also contains a number of unique signal processing functions that extend its capability beyond a basic VLBI correlator: flexible Local Oscillator frequency switching for bandwidth synthesis; rapid (1 ms) correlator dump intervals (allowing, for example, the study of some single-pulse pulsar characteristics on VLBI baselines); simple but powerful multi-rate digital signal-processing techniques to allow correlation of signals at different but related sample rates; and a digital 'zoom' filter for producing very high resolution cross-power spectra. The correlator software, written almost entirely in 'C', is highly integrated into the system, supports all of the functions mentioned above, and is re-configurable to support expansion of the correlator. The software schedules the use of hardware resources to enable correlation of multiple observations concurrently, and automatically schedules the correlation of observations that require more than the available number of physical playback terminals. There is also substantial pre-correlation consistency checking. The delay model is based on CALC for ground-based antennas and NAIF for space-based antennas. Output data is stored in the UVFITS format. The paper describes the des...