The sun erupted with a surprise solar flare on Saturday (July 3), the largest since 2017, in an early explosion of cosmic fireworks ahead of the Fourth of July.

The solar flare occurred from a sunspot called AR2838 at 10:29 a.m. EDT (1429 GMT) on Saturday and registered as a powerful X1-class sun event, according to the U.S. Space Weather Prediction Center (SWPC) tracking the sun’s weather.

X-class solar flares are the strongest kind of eruptions on the sun. When aimed directly at Earth, the most powerful ones can endanger astronauts and satellites in space, as well as interfere with power grids on Earth. More moderate M-class solar flares can also supercharge Earth’s auroras with dazzling displays.