Coupling special relativistic magnetohydrodynamics and spectral neutrino transport, we performed long-term simulations of the collapse of rapidly rotating stellar cores with strong magnetic fields. After their collapse, these cores may launch highly energetic explosions. Our models include cores in which the proto-neutron star at the centre of the core may collapse to a black hole as well as ones that, at least temporarily, avoid that fate. The latter case may allow for a proto-magnetar driving relativistic outflows as the central engine of a GRB. We explored the mechanisms that launch an explosion and the processes determining which of these two scenarios plays out.