IT HAPPENED on Jan. 28, 1976. A star in the northern skies the size of our own sun exploded. Or ran out of its nuclear fuel supply and collapsed down to the size of the earth's moon. Stars explode and collapse all the time, but not the way this one did. This star completed its explosion or collapse in 40 seconds. And in that brief span enough energy was released in the northern skies to supply the earth and its 4 billion people with electricity for the next billion years.

"It's an incredible puzzle," is how it's described by Dr. Doyle Evans of the Los Alamos Scientific Laboratory in New Mexico. "We typically think of stellar processes as things that take time, but not this one. We've never seen such a release of energy anywhere in the heavens in such a short time."

Although the stellar event took place in the northern skies, no telescope actually "saw" it. No light accompanied the event, suggesting that if it was an explosion it took place halfway across the universe. The way the event was identified was by the gamma rays it released. So intense were the rays that if the event had occurred anywhere in the Milky Way, it would have been the equivalent of 100 billion solar flares. If it was a "thermal" event like an explosion, it would have produced a temperature of 100 million degrees.

Astronomers thought this burst of energy might have been the first sign of a supernova, an exploding star so bright that its remnants can be seen for almost two months afterward. But there was no flare of gas anywhere in the sky, no sudden brightening near the source of the explosion. It was not a supernova.

The event is being described by astronomers as a gamma ray burst, the most energetic of some 80 gamma ray bursts seen by astronomers in the past eight years.

Gamma ray bursts are a new celestial phenomenon, newer than quasars and pulsars and even more mysterious. All gamma ray bursts have been seen by satellites, since gamma rays do not penetrate the atmosphere for ground-based telescopes to see. Most gamma ray bursts have lasted less than one second.

"There's no question we've seen an event of some kind - the birth of a star, the death of a star or a dramatic change in a star," says Dr. Thomas Cline of the Goddard Space Flight Center. "All these gamma ray bursts have been stellar events of some kind." "We Didn't Believe It"

GAMMA RAY bursts were first seen in 1969 by the Vela satellite put into earth orbit by the United States to police the ban on the testing of nuclear bombs in the atmosphere or in space. Among other things, the six Velas circling the globe are built to look for the gamma rays that are characteristic signatures of nuclear explosions. The only other phenomenon that produces gamma rays is a flare on the surface of the sun.

"When we saw our first gamma ray burst we didn't believe it," recalls Doyle Evans of Los Alamos, which designed and built the Vela satellites. "It was incomprehensible that such energy releases could take place and be over so quickly."

The Velas had seen no fewer than 16 gamma ray bursts before Los Alamos scientists published a paper in 1973 describing them. A Los Alamos physicist named Raymond Klebesadel gave them the name "gamma ray bursts" because they resembled the bursts of gamma rays released by the explosion of an atomic bomb.

In the last four years, almost 80 gamma ray bursts have been recorded from about 80 different regions in the sky. No two bursts have ever come from the same place in the sky, meaning that they are signs of single stellar events that cannot repeat themselves. Like an exploding or collapsing star.

Besides being the brightest, the gamma ray burst of Jan. 28, 1976, was also the first one scientists could even vaguely locate in the sky. The burst was detected by two Vela satellites in earth orbit and the Helios satellite that had just been launched from earth and was driving out past the moon toward the sun. The burst was also detected by a British satellite named Ariel 5.

The four observations allowed scientists to triangulate the sightings by measuring the time that each sighting took place to within a few hundred milliseconds. What the triangulation did was to fix the source of the gamma rays to a small "box" in the northern sky about 12 degrees north of the galactic plane, not far enough out of the plane to say the burst had taken place in another galaxy and not near enough to the plane to say it happened in the Milky Way.

The "box" in the sky was remarkably close to where a quasar known simply as 3C-175 is located. For a while, scientists thought the burst might have come from the quasar, but exhaustive re-analysis of all four satellite sightings showed it was just far enough away that it couldn't be the quasar. A Birth, Death or Change

THEN WHAT was it? There was almost as many theories for the origins of gamma ray bursts as there have been sightings. Many scientists think they mark the birth of a white dwarf, a star that gradually loses its nuclear fuel and becomes what is known as a red giant before collapsing into the white dwarf stage, a burned-out star.

Some scientists believe the gamma ray bursts are the death of throes of stars that have turned into black holes, exhausting their nuclear fuel so suddenly that they collapse to celestial bodies so dense they allow none of their own light to escape.A few scientists suggest they're even more mysterious white holes, which are stars that have gone through the black hole stage and exploded again.

Only two things are known for sure about the gamma ray burst of Jan. 28, 1976. It happened in a place where there are no extraordinary stars and it had to be the birth, death or change of a star no bigger and possibly even smaller than our own sun. The reason that's known is that there were only tiny changes in the "pitch" of the gamma ray burst through its 40-second lifetime.

"It's hard to explain," says Goddard's Thomas Cline, "but if something blows up and it's small, then the explosion takes place in a shorter period of time. Just like birds emit higher-pitched sounds than lions do. Simply because they're smaller."

That's no much information to go on, but time may change all that. Gamm ray detectors of more precision than anything in space right now are aboard three satellites, called the International Sun-Earth Explorers, either launched or about to be launched. Another detector will be on the Pioneer-Venus spacecraft that will orbit Venus two years hence.

At the least, the positions in space of all these gamma ray detectors will enable scientists to pinpoint the sources of future gamma ray bursts. At best, they will give scientists such precise locations of gamma ray sources with optical or radio telescopes and be on their way to solving what is now little more than a deep cosmological mystery.