His golden discovery was rocked.

A metal-detecting enthusiast was surprised to learn that the rock he uncovered and believed to be gold was actually from space.

Australian Dave Hole was convinced that his find — dense for its size at nearly 40 pounds — must have contained a nugget of the precious metal. However, a big swing of his sledgehammer failed to put a dent in the rock.

Hole told The Sydney Morning Herald that he thought, “What the hell is this thing?” at the time of his 2015 find, according to the New York Post.

He took the rock to Melbourne Museum for analysis, and that’s when it became clear that this was no ordinary Earthly object.

Hole had discovered a roughly 4.6-billion-year-old meteorite.

“You’re looking right back to the formation of the solar system here,” geologist Dermot Henry told the outlet, saying the rock, classified in a scientific paper as an H5 ordinary chondrite, has a “sculpted, dimpled look” that took shape after breaking through Earth’s atmosphere.

The object is now nicknamed the Maryborough meteorite after the town Hole uncovered the otherworldly mass.

Recommended video

Henry said it’s likely only came to Earth 200 years ago or less.

“This particular meteorite most probably comes out of the asteroid belt between Mars and Jupiter, and it’s been nudged out of there by some asteroids smashing into each other, then one day it smashes into Earth,” Henry told Channel 10 News, according to Science Alert.

Hole said he knows how lucky his discovery was.

“It was just potluck, mate. A billion to one — bigger, a trillion to one,” he said. “Got more chance of being struck by lightning twice.”