Several searches for near-Earth objects have recently been initiated, as a result of increased awareness of the hazard of impacts on the Earth. These programs mainly search for asteroids, so amateur astronomers can still contribute to the discovery of comets, especially out of the orbital plane of the Solar System. An ideal way to search for comets would be to use a spaceborne instrument capable of imaging the whole sky on a daily basis in a systematic and repeatable way. Such an instrument already exists on the solar observatory SOHO; it operates at the Lyman-alpha wavelength of neutral hydrogen, which is the main component of the emission cloud of a comet. Here we report the discovery, using archival data from this satellite, of a hitherto unnoticed comet which reached a perihelion of 1.546 a.u. on 26 June 1997. We derive the water production rate of the comet as a function of time and find that it increases after perihelion, like that of comet Halley.