  Context. Some of the most dynamic active regions are associated with complex
photospheric magnetic configurations such as quadrupolar regions, and
especially ones with a $\delta$-spot configuration and a strong Polarity
Inversion Line (PIL). Aims. We study the formation and eruption of magnetic
flux ropes in quadrupolar regions. Methods. 3D MHD simulations of the partial
emergence of a highly twisted flux tube from the solar interior into a
non-magnetized stratified atmosphere. Results. We emerge two $\Omega$-shaped
loops forming a quadrupolar region. The emerging flux forms two initially
separated bipoles, that later come in contact creating a $\delta$-spot central
region. Above the two bipoles, two magnetic lobes expand and interact through a
series of current sheets at the interface between them. Two recurrent confined
eruptions are produced. In both cases, reconnection between sheared low-lying
field lines forms a flux rope. Reconnection between the two lobes high in the
atmosphere forms retracting field lines that push against the flux rope,
creating a current sheet between them. It also forms a third magnetic lobe
between the two emerged ones, that later acts as a strapping field. The flux
rope eruptions are triggered when the reconnection between the flux ropes and
the field above them becomes efficient enough to remove the tension of the
overlying field. These reconnection events occur internally in the system. The
first erupting flux rope almost fully reconnects with the overlying field. The
second eruption is confined by the overlying field. During the confined
eruption, the flux rope is enhanced in size, flux and twist, similar to
confined-flare-to-flux-rope observations. Proxies of the emission reveal the
two erupting filaments channels. A flare arcade is formed only in the second
eruption due to the longer-lasting and more efficient reconnection below the
flux rope.
