When a star passes within the tidal radius of a supermassive black hole, it will be torn apart. For a star with the mass of the Sun ($M_odot$) and a non-spinning black hole with a mass $<10^8 M_odot$, the tidal radius lies outside the black hole event horizon and the disruption results in a luminous flare. Here we report observations over a period of 10 months of a transient, hitherto interpreted as a superluminous supernova. Our data show that the transient rebrightened substantially in the ultraviolet and that the spectrum went through three different spectroscopic phases without ever becoming nebular. Our observations are more consistent with a tidal disruption event than a superluminous supernova because of the temperature evolution, the presence of highly ionised CNO gas in the line of sight and our improved localisation of the transient in the nucleus of a passive galaxy, where the presence of massive stars is highly unlikely. While the supermassive black hole has a mass $> 10^8 M_odot$, a star with the same mass as the Sun could be disrupted outside the event horizon if the black hole were spinning rapidly. The rapid spin and high black hole mass can explain the high luminosity of this event.