The expansion of a dense plasma into a dilute plasma across an initially uniform perpendicular magnetic field is followed with a one-dimensional particle-in-cell (PIC) simulation over MHD time scales. The dense plasma expands in the form of a fast rarefaction wave. The accelerated dilute plasma becomes separated from the dense plasma by a tangential discontinuity at its back. A fast magnetosonic shock with the Mach number 1.5 forms at its front. Our simulation demonstrates how wave dispersion widens the shock transition layer into a train of nonlinear fast magnetosonic waves.