In this paper we characterise the minimisers of a one-parameter family of nonlocal and anisotropic energies $$I_\alpha $$
I
α
defined on probability measures in $${\mathbb {R}}^n$$
R
n
, with $$n\ge 3$$
n
≥
3
. The energy $$I_\alpha $$
I
α
consists of a purely nonlocal term of convolution type, whose interaction kernel reduces to the Coulomb potential for $$\alpha =0$$
α
=
0
and is anisotropic otherwise, and a quadratic confinement. The two-dimensional case arises in the study of defects in metals and has been solved by the authors by means of complex-analysis techniques. We prove that for $$\alpha \in (-1, n-2]$$
α
∈
(
-
1
,
n
-
2
]
, the minimiser of $$I_\alpha $$
I
α
is unique and is the (normalised) characteristic function of a spheroid. This result is a paradigmatic example of the role of the anisotropy of the kernel on the shape of minimisers. In particular, the phenomenon of loss of dimensionality, observed in dimension $$n=2$$
n
=
2
, does not occur in higher dimension at the value $$\alpha =n-2$$
α
=
n
-
2
corresponding to the sign change of the Fourier transform of the interaction potential.