A cosmic collision was caught on video earlier this month when an unknown object slammed into Jupiter while amateur astronomers watched.

It's not clear whether the object that hit the planet on March 17 was a comet or asteroid, but a NASA scientist told Space.com it was probably the latter.

"It's more likely to be an asteroid simply because there are more of them," Paul Chodas, head the agency's Near-Earth Object Program at the Jet Propulsion Laboratory, told the website.

Whatever it was, multiple witnesses viewed the collision, including an amateur astronomer based in Ireland who was just hoping to create a great time-lapse video.

"The original purpose of the imaging session was to get this time-lapse, with a happy coincidence of the impact in the second last capture of the night," John McKeon wrote in his video's YouTube description, published on Tuesday.

The time-lapse was stunning even without the impact:

But then McKeon captured something even more unusual:

McKeon was one of several skywatchers to witness the impact and record it on video. Gerrit Kernbauer, who was in Austria, didn't realize what he had filmed at first because he didn't watch the video until 10 days later.

"I found this strange light spot that appeared for less than one second on the edge of the planetary disc," Kernbauer wrote.

He magnified the video and slowed it down:

"Thinking back to Shoemaker-Levy 9, my only explanation for this is an asteroid or comet that enters Jupiter's high atmosphere and burned up/explode very fast," he wrote.

Fragments of the Shoemaker-Levy 9 comet slammed into Jupiter in 1994 as astronomers looked on. In a 2013 blog post, physicist Mark Boslough of Sandia National Laboratories called it "one of the most spectacular celestial displays ever witnessed."

Sky and Telescope reported that the latest impact on Jupiter was the fourth of its kind over the last decade.