The role of magnetic fields during the initial stages of protostellar cloud collapse is investigated, in particular with respect to the scenario where the magnetic force can be an effective compressor due to diamagnetic effects. A multifluid approach involving electrons, ions of different atomic masses and neutrals is adopted, where each species is treated separately. The electron fluid is compressed by the magnetic pressure force, and the other ion species are pulled by the collective electric field developed by the space charge separation. The neutrals are also dragged owing to collisions with the ions. The difference in charge-to-mass ratio ensures that each ion species is accelerated differently, resulting in a distribution following their atomic masses. This model explores the scenario where the electromagnetic forces can achieve a supercritical mass-to-flux ratio in a magnetized cloud before dynamical collapse due to gravity takes over.