The second-fastest pulsar ever discovered has been caught spitting out gamma rays, and this surprise discovery could help astronomers better understand the properties of these strange and extreme stars.

The gamma radiation of millisecond pulsar PSR J0952−0607 is so faint, detecting it required some clever new search methods - and these made it possible to take unprecedented measurements of the star.

Pulsars are a type of dead star called neutron stars, the end result of a star that's too massive to become a white dwarf, and not massive enough to become a black hole. But the rotation of these pulsars is such that, as they spin, they sweep Earth with a beam of radiation, sometimes on timescales so precise they can help us measure the Universe.

Some of these pulsars are rotating so fast, they go round on millisecond scales; fittingly, we call those millisecond pulsars, and they are usually found with a binary companion. It's thought that their rotation speeds up as they suck material away from that companion.

The first time gamma radiation was discovered emitting from a millisecond pulsar was in 1999. The second wasn't discovered until 2009, but since then, many more millisecond pulsars have been linked with gamma rays.

But PSR J0952−0607, discovered in 2017, rotates at a mind-blowing 707 times per second; it's now the fastest millisecond pulsar for which astronomers have been able to measure its spin-down rate (the rate at which it is slowing down), and its surface magnetic field.

According to the official Fermi website in 2016, at least 17 percent of millisecond pulsars have been detected emitting gamma rays, compared to just 3 percent of the normal pulsar population.

But PSR J0952−0607 is one of the most extreme yet, second only to PSR J1748-2446ad, discovered in 2006 to be rocketing around at 716 rotations per second.

To put PSR J0952−0607's 707 rotation in perspective, if we assume a diameter of 20 kilometres (standard for neutron stars), its equator would be travelling at an insane 44,422 kilometres per second - around 14 percent of the speed of light.

It's also what we call a "black widow". The pulsar is 1.4 times the mass of the Sun, squished down into that teeny tiny diameter, with a binary companion around 0.02 times the mass of the Sun. What makes it a black widow is that insanely low binary companion mass: the pulsar has clearly slurped up most of its companion.

However, when it was discovered in 2017, no gamma rays were detected emanating from the pulsar when researchers used the Fermi Gamma-ray Space Telescope. The pulsar itself was discovered with the Low-Frequency Array (LOFAR) radio telescope, in frequencies well below those typically used for pulsar searches.

Astronomer Lars Nieder of the Max Planck Institute for Gravitational Physics is working on expanding the catalogue of gamma-ray pulsars, so he decided to take a closer look at PSR J0952−0607.

He and colleagues combed through 8.5 years of data from Fermi - between August 2008 and January 2017 - and combined that with two years' worth of observations from LOFAR. He also took new optical observations from two telescopes, and even conducted a search for gravitational waves using LIGO.

"This search is extremely challenging because [Fermi] only registered the equivalent of about 200 gamma rays from the faint pulsar over the 8.5 years of observations. During this time the pulsar itself rotated circa 200 billion times. In other words, only once in every billion rotations was a gamma ray observed," Nieder said.

"For each of these gamma rays, the search must identify exactly when during each of the 1.4 millisecond rotations it was emitted."

This search for gamma-ray emissions was conducted using the powerful Atlas Computing Cluster. And it found the signal - but something, Nieder said, was awry.

"The signal was very faint and not quite where it was supposed to be. The reason: our detection of gamma rays from J0952-0607 had revealed a position error in the initial optical-telescope observations which we used to target our analysis. Our discovery of the gamma-ray pulsations revealed this error," he explained.

"This mistake was corrected in the publication reporting the radio pulsar discovery. A new and extended gamma-ray search made a rather faint - but statistically significant - gamma-ray pulsar discovery at the corrected position."

And there was another surprise: there were no gamma-ray detections in the data before 2011. Why? Well, we don't know.

It's possible stellar variability has something to do with it; maybe the gamma radiation was weaker then - too weak to detect, for some reason. Or there was a change in the orbit or rotation, although nothing else in the data suggests this at all. The team will keep studying the star to try and understand this peculiar behaviour.

This new, closer distance also meant the team could go back and revise the known physical parameters of the pulsar. And they found that it has among the 10 weakest magnetic fields ever detected in a pulsar.

This is consistent with the theory that active accretion by a pulsar dampens its magnetic field - and it could, the researchers say, help us place a constraint on the minimum magnetic field strength of these wild stars.

The research has been published in The Astrophysical Journal.