We construct a QCD-based model where soft gluon rescattering between final state partons indeep inelastic scattering leads to events with large rapidity gaps and a leading proton. The modelsuccessfully describes the precise HERA data on the diffractive deep inelastic structure functionin the whole available kinematical range.