© 2018 The Author(s). Wide-field optical surveys have begun to uncover large samples of fast (trise ≲ 5 d), luminous (Mpeak < -18), blue transients. While commonly attributed to the breakout of a supernova shock into a dense wind, the great distances to the transients of this class found so far have hampered detailed investigation of their properties. We present photometry and spectroscopy from a comprehensive worldwide campaign to observe AT 2018cow (ATLAS 18qqn), the first fast-luminous optical transient to be found in real time at lowredshift. Our first spectra (<2 days after discovery) are entirely featureless. A very broad absorption feature suggestive of nearrelativistic velocities develops between 3 and 8 days, then disappears. Broad emission features of H and He develop after >10 days. The spectrum remains extremely hot throughout its evolution, and the photospheric radius contracts with time (receding below R < 1014 cm after 1 month). This behaviour does not match that of any known supernova, although a relativistic jet within a fallback supernova could explain some of the observed features. Alternatively, the transient could originate from the disruption of a star by an intermediate-mass black hole, although thiswould require long-lasting emission of highly super-Eddington thermal radiation. In either case, AT 2018cow suggests that the population of fast luminous transients represents a new class of astrophysical event. Intensive follow-up of this event in its late phases, and of any future events found at comparable distance, will be essential to better constrain their origins.