Gravitational waves have been detected from a binary neutron star merger event, GW170817. The detection of electromagnetic radiation from the same source has shown that the merger occurred in the outskirts of the galaxy NGC 4993, at a distance of 40 megaparsecs from Earth. We report the detection of a counterpart radio source that appears 16 days after the event, allowing us to diagnose the energetics and environment of the merger. The observed radio emission can be explained by either a collimated ultra-relativistic jet viewed off-axis, or a cocoon of mildly relativistic ejecta. Within 100 days of the merger, the radio light curves will distinguish between these models and very long baseline interferometry will have the capability to directly measure the angular velocity and geometry of the debris.