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 ultrarelativistic jet, viewed off-axis, or a cocoon of mildly relativistic ejecta. Within 100 days of the merger, the radio light curves will enable observers to distinguish between these models, and the angular velocity and geometry of the debris will be directly measurable by very long baseline interferometry.