The filamentation instability (FI) driven by beams of counter-propagating electrons is examined with one dimensional (1D) and two-dimensional (2D) particle-in-cell (PIC) simulations. The 1D simulation reveals the saturation mechanism of the FI. The magnetic pressure gradient displaces the electrons. The resulting electrostatic field inhibits together with the magnetic field a further growth of the filaments by suppressing the electron motion. The FI evolves into a stationary equilibrium in 1D, which shows a statistical distribution of the filament sizes that resembles a Gumbel distribution. The 2D PIC simulation allows the filaments to move around each other and filaments carrying currents of equal polarity can merge. The time-evolution of the characteristic size of the filaments in the 2D simulation is measured. It increases linearly with the time.