The intermediate long–wave (ILW) equation is a weakly nonlinear integrodifferential equation which governs the evolution of long internal waves in a stratified fluid of finite depth. It reduces to the Korteweg–de Vries (KdV) and to the Benjamin–Ono (BO) equations for shallow and large depths respectively. Solitary wave solutions of the ILW equation are well known, however analytic expressions for periodic solutions of the same equation do not seem to exist. Such expressions are derived in this paper and a remarkable property discovered for these periodic waves is that they can be represented as an infinite sum of spatially repeated solitons. Thus, nonlinear periodic solutions of the ILW equation are obtained by linear superposition of solitons.