Variable x-ray and γ-ray emission is characteristic of the most extreme physical processes in the universe. We present multiwavelength observations of a unique γ-ray-selected transient detected by the Swift satellite, accompanied by bright emission across the electromagnetic spectrum, and whose properties are unlike any previously observed source. We pinpoint the event to the center of a small, star-forming galaxy at redshift z = 0.3534. Its high-energy emission has lasted much longer than any γ-ray burst, whereas its peak luminosity was ∼100 times higher than bright active galactic nuclei. The association of the outburst with the center of its host galaxy suggests that this phenomenon has its origin in a rare mechanism involving the massive black hole in the nucleus of that galaxy.