  The existence of black holes of masses ~ 10^2-10^5 Msun has important
implications for the formation and evolution of star clusters and supermassive
black holes. One of the strongest candidates to date is the hyperluminous X-ray
source HLX1, possibly located in the S0-a galaxy ESO243-49, but the lack of an
identifiable optical counterpart had hampered its interpretation. Using the
Magellan telescope, we have discovered an unresolved optical source with R =
(23.80 +/- 0.25) mag and V = (24.5 +/- 0.3) mag within HLX1's positional error
circle. This implies an average X-ray/optical flux ratio ~ 500. Taking the same
distance as ESO243-49, we obtain an intrinsic brightness M_R = (-11.0 +/- 0.3)
mag, comparable to that of a massive globular cluster. Alternatively, the
optical source is consistent with a main-sequence M star in the Galactic halo
(for example an M4.4 star at ~ 2.5 kpc). We also examined the properties of
ESO243-49 by combining Swift/UVOT observations with stellar population
modelling. We found that the overall emission is dominated by a ~5 Gyr old
stellar population, but the UV emission at ~2000 Ang is mostly due to ongoing
star-formation at a rate of ~ 0.03 Msun/yr. The UV emission is more intense (at
least a 9-sigma enhancement above the mean) North East of the nucleus, in the
same quadrant as HLX1. With the combined optical and X-ray measurements, we put
constraints on the nature of HLX1. We rule out a foreground star and a
background AGN. Two alternative scenarios are still viable. HLX1 could be an
accreting intermediate-mass black hole in a star cluster, which may itself be
the stripped nucleus of a dwarf galaxy that passed through ESO243-49, an event
which might have caused the current episode of star formation. Or, it could be
a neutron star in the Galactic halo, accreting from an M4-M5 donor star.
