IRMHD: an implicit radiative and magnetohydrodynamical solver for self-gravitating systems. The 2D implicit hydrodynamical solver developed by Hujeirat &38; Rannacher is now modified to include the effects of radiation, magnetic fields and self-gravity in different geometries. The underlying numerical concept is based on the operator splitting approach, and the resulting 2D matrices are inverted using different efficient preconditionings such as ADI (alternating direction implicit), the approximate factorization method and Line–Gauss–Seidel or similar iteration procedures. Second-order finite volume with third-order upwinding and second-order time discretization is used. To speed up convergence and enhance efficiency we have incorporated an adaptive time-step control and monotonic multilevel grid distributions as well as vectorizing the code. Test calculations had shown that it requires only 38 per cent more computational effort than its explicit counterpart, whereas its range of application to astrophysical problems is much larger. For example, strongly time-dependent, quasi-stationary and steady-state solutions for the set of Euler and Navier–Stokes equations can now be sought on a non-linearly distributed and strongly stretched mesh. As most of the numerical techniques used to build up this algorithm have been described by Hujeirat &38; Rannacher in an earlier paper, we focus in this paper on the inclusion of self-gravity, radiation and magnetic fields. Strategies for satisfying the condition ∇.B = 0 in the implicit evolution of MHD flows are given. A new discretization strategy for the vector potential which allows alternating use of the direct method is prescribed. We investigate the efficiencies of several 2D solvers for a Poisson-like equation and compare their convergence rates. We provide a splitting approach for the radiative flux within the FLD (flux-limited diffusion) approximation to enhance consistency and accuracy between regions of different optical depths. The results of some test problems are presented to demonstrate the accuracy and robustness of the code.