Time and space resolved measurement of the electron temperature, mass density and ionization state in the ablation plasma between two exploding Al wiresa) Electron beams propagating in the ion focused regime ͑Bennett pinch͒ are known as phase-mixed electron beams. Such beams are of interest for various sources of coherent electromagnetic radiation ͑pasotrons, ion-channel lasers, ion-channel guided free-electron lasers͒. Typically, the transition of a beam from a quasilaminar state near the gun to a phase-mixed equilibrium state known as the Bennett pinch is accompanied by the appearance of betatron oscillations. In pasotrons these oscillations play a negative role because they often result in certain beam losses due to the interception of beam electrons oscillating with large amplitudes by the chamber walls. The betatron oscillations and the beam losses associated with them can be monitored by using a weak local external magnetic field ͑magnetic lens͒ in the transition region. This paper is devoted to the analysis of the beam dynamics in the transition region and to the study of the effect of the magnetic lens. With the use of the concept of the free energy of the ensemble of charged particles, the relation between the beam radius in the Bennett pinch and the radii at the entrance and exit from a magnetic lens is derived. The results obtained show that, by using a properly designed and positioned magnetic lens in pasotrons, a halo in the phase-mixed beam can be greatly reduced and the beam losses can be practically eliminated.