Recent observations show that the probability of encountering an extremely large rogue wave in the open ocean is much larger than expected from ordinary wave-amplitude statistics. Although considerable effort has been directed towards understanding the physics behind these mysterious and potentially destructive events, the complete picture remains uncertain. Furthermore, rogue waves have not yet been observed in other physical systems. Here, we introduce the concept of optical rogue waves, a counterpart of the infamous rare water waves. Using a new real-time detection technique, we study a system that exposes extremely steep, large waves as rare outcomes from an almost identically prepared initial population of waves. Specifically, we report the observation of rogue waves in an optical system, based on a microstructured optical fibre, near the threshold of soliton-fission supercontinuum generation--a noise-sensitive nonlinear process in which extremely broadband radiation is generated from a narrowband input. We model the generation of these rogue waves using the generalized nonlinear Schrödinger equation and demonstrate that they arise infrequently from initially smooth pulses owing to power transfer seeded by a small noise perturbation.