An extended Korteweg–de Vries (KdV) equation is derived that describes the evolution and propagation of long interfacial gravity waves in the presence of a strong, space–time varying background. Provision is made in the derivation for a spatially varying lower depth so that some topographic effects can also be included. The extended KdV model is applied to some simple scenarios in basins of constant and varying depths, using approximate expressions for the variable coefficients derived for the case when the background field is composed of a moderate-amplitude ultra-long wave. The model shows that energy can be transferred either to or from the evolving wave packet depending on the relative phases of the evolving waves and the background variation. Comparison of the model with laboratory experiments confirms its applicability and usefulness in examining the evolution of weakly nonlinear waves in natural systems where the background state is rarely uniform or steady.