Context. Among other things, solar flares are accompanied by the production of energetic electrons as seen in the nonthermal radio and X-ray radiation of the Sun. Observations of the RHESSI satellite show that 10 32 −10 36 nonthermal electrons are produced per second during flares. They are related to an energy flux in the range 10 18 −10 22 W. These electrons play an important role, since they carry a substantial part of the energy released during a flare. Aims. In which way so many electrons are accelerated up to high energies during a fraction of a second is still an open question. By means of radio and hard X-ray data, we investigate under which conditions this acceleration happens in the corona. Methods. The flare is considered in the framework of magnetic reconnection. The conditions in the acceleration region in the corona are deduced by using the conservation of the total electron number and energy. Results. In the inflow region of the magnetic reconnection site, there are typical electron number densities of about 2.07×10 9 cm −3 and magnetic fields of about 46 G. These are regions with high Alfvén speeds of about 2200 km s −1 . Then, sufficient energetic electrons (as required by the RHESSI observations) are only generated if the plasma inflow towards the reconnection site has Alfvén-Mach numbers in the range 0.1−1, which can lead to a super-Alfvénic outflow with speeds up to 3100 km s −1 .