When the new Duke and Duchess of Cambridge—better known as Prince William and Kate Middleton—married Friday, they sealed the deal with a ring made of gold mined in Wales. As an estimated two billion people worldwide watched the festivities, some viewers may have wondered, "When did gold form in Wales?"

About 400 million years ago, ancient tectonic plates collided along a boundary that extended across what is now the Atlantic Ocean, underneath both Wales and North America. The collision heated the rock in the boundary to about 400 degrees Celsius, setting off metamorphic reactions that released fluids from the rock, explains Jeremy Richards, a University of Alberta geologist. As the fluids flowed along fractures in the surface of the Earth, they cooled and precipitated quartz and gold, among other minerals.

Thus the gold mines in Wales, which have served as the source for several wedding rings worn by the British monarchy, hold rare but large clumps of bling in long veins of quartz. "It's very attractive ore," says Richards, who previously taught at the University of Leicester in the U.K. and would bring his students to see the Welsh mines.

Wales isn't exactly a rich source of gold, however. The gold there is so rare and difficult to remove that the mines aren't commercially viable. Welsh gold generally sells as a curio, at prices much higher than the market value of gold.

Most of the gold in the world comes from Nevada and the mountain ridge of Witwatersrand in South Africa. Gold in both places is present in fine grains in low concentration, so mining companies dig large open pits and leach the rock with cyanide to retrieve the gold. In contrast, the Welsh mining companies dig tunnels following quartz veins. They grind up the quartz, then put it on shaking tables to separate the lighter quartz from heavier gold. The process works like a large-scale version of a California forty-niner's gold pan.

The simplicity of the process of purifying Welsh gold is one of the reasons the mines have been exploited since Roman times, Richards says. The Romans, of course, didn't have the technology to detect fine-grain gold like what's found in Nevada or Witwatersrand. But they would have clearly seen the gold nuggets nestled in the Welsh quartz veins.

So the royal family of England may have a tradition of using Welsh gold in their jewelry, but they're only the most recent of a centuries-long line of people who have taken the 400-million-year-old ore from the ancient hillsides of Wales.