  We study X-ray emission from young stars by analyzing deep XMM-Newton
observations of two regions of the Upper Scorpius association, having an age of
5 Myr. Based on near infrared and optical photometry we identify 22 Upper
Scorpius photometric members among the 224 detected X-ray sources. We derive
coronal properties of Upper Scorpius stars by performing X-ray spectral and
timing analysis. The study of four strong and isolated stellar flares allows us
to derive the length of the flaring loops. Among the 22 Upper Scorpius stars,
13 are identified as Upper Scorpius photometric members for the first time. The
sample includes 7 weak-line T Tauri stars and 1 classical T Tauri star, while
the nature of the remaining sources is unknown. Except for the intermediate
mass star HD 142578, all the detected USco sources are low mass stars of
spectral type ranging from G to late M. The X-ray emission spectrum of the most
intense Upper Scorpius sources indicates metal depleted plasma with temperature
of ~10 MK, resembling the typical coronal emission of active main sequence
stars. At least 59% of the detected members of the association have variable
X-ray emission, and the flaring coronal structures appear shorter than or
comparable to the stellar radii already at the Upper Scorpius age. We also find
indication of increasing plasma metallicity (up to a factor 20) during strong
flares. We identify a new galaxy cluster among the 224 X-ray source detected:
the X-ray spectrum of its intra cluster medium indicates a redshift of
0.41+/-0.02.
