  We present the results of a 140 ks XMM-Newton observation of the B2 star
$\rho$ Ophiuchi A. The star has exhibited strong X-ray variability: a
cusp-shaped increase of rate, similar to that which we partially observed in
2013, and a bright flare. These events are separated in time by about 104 ks,
which likely corresponds to the rotational period of the star (1.2 days). Time
resolved spectroscopy of the X-ray spectra shows that the first event is caused
by an increase of the plasma emission measure, while the second increase of
rate is a major flare with temperatures in excess of 60 MK ($kT\sim5$ keV).
From the analysis of its rise, we infer a magnetic field of $\ge300$ G and a
size of the flaring region of $\sim1.4-1.9\times10^{11}$ cm, which corresponds
to $\sim25\%-30\%$ of the stellar radius. We speculate that either an intrinsic
magnetism that produces a hot spot on its surface or an unknown low mass
companion are the source of such X-rays and variability. A hot spot of magnetic
origin should be a stable structure over a time span of $\ge$2.5 years, and
suggests an overall large scale dipolar magnetic field that produces an
extended feature on the stellar surface. In the second scenario, a low mass
unknown companion is the emitter of X-rays and it should orbit extremely close
to the surface of the primary in a locked spin-orbit configuration, almost on
the verge of collapsing onto the primary. As such, the X-ray activity of the
secondary star would be enhanced by its young age, and the tight orbit as in RS
Cvn systems and $\rho$ Ophiuchi would constitute an extreme system that is
worthy of further investigation.
