“We caught the whole thing on tape, so to speak,” Dr. Soderberg said in an interview. “I truly won the astronomy lottery. A star in the galaxy exploded right in front of my eyes.”

She and 42 colleagues from around the world have now told the tale of this discovery in a paper in Nature to be published Thursday and in a telephone news conference Wednesday. The observations, they say, provide a new window into the process by which the most massive stars end their lives and give astronomers new clues on how to look for these rare events and catch them while they are still in their most explosive, formative stages.

Most supernovas, Dr. Soderberg explained, are discovered and classified by their visible light, but that typically does not happen until the explosion is a month or more old and has brightened enough to be seen over intergalactic distances.

The true fireworks, she said, happen much earlier when a shock wave from the imploding core hits the star’s surface, producing so-called breakout light, which lasts only a few minutes.

“The physics of the explosion is encoded in the breakout light,” Dr. Soderberg said, adding that the chance that the Swift telescope was observing during those moments was “unfathomable.” Astronomers now know, however, that X-rays from the breakout can be an early alert. “Supernova 2008D was the first to be found from its X-ray emission,” said Robert Kirshner, a supernova expert at the Harvard-Smithsonian Center for Astrophysics, referring to the supernova by its official name, “but if we build the right type of X-ray satellites, it won’t be the last supernova we find this way.”