lines has so far been limited to studies using 1D hydrodynamic models with heating by a prescribed electron beam [e.g. @2005ApJ...630..573A; @2017ApJ...842...82R].]{} [Line profiles from these simulations fail to reproduce the line widths. However they can sometimes be achieved by adding artificial large velocity gradients to the simulation results.]{} [Some observed profiles, typically in [h&k]{}, have a single emission peak with a very wide symmetric base. Such profiles cannot be simulated by velocity gradients or microturbulence only [@2017ApJ...842...82R].]{}

[In this paper, we use a 3D MHD model that self-consistently shows both long fibrils and flare ribbons. It was computed using the radiation-MHD code MURaM . The computational domain spans over]{} an entire active region, and contains a bipolar sunspot pair. The run produces a magnetic reconnection event in the simulated corona resembling observational characteristics of a flare and an eruption of cool chromospheric material [@2018NatAs.tmp..173C].

The radiative transfer computations were performed in full 3D including partially coherent scattering (PRD) as well as charge conservation. [(which is particularly important for hydrogen and has a clear effect in the Ca <span style="font-variant:small-caps;">ii</span> and Mg <span style="font-variant:small-caps;">ii</span> intensities).]{} We investigate in detail the formation of the [K]{}/ $8542$ Å, [k]{}, and [H$\alpha$]{} lines, 