Google.com, one of the most valuable domains on the Internet, was mistakenly sold for $12 last fall.

Google paid $12,000 to get it back.

The buyer was a former Googler, Sanmay Ved, who discovered Google.com on the list of domains available for sale on September 29. He bought it, charging the $12 fee to his Discover card, never really expecting the transaction to go through.

"I was hoping I would get an error at sometime saying transaction did not go through, but I was able to complete purchase, and my credit card was actually charged!" he wrote in a post on LinkedIn last fall.

He told CNNMoney he made the purchase simply out of curiosity.

"I thought at some point in time it would block me out, but I wanted to see how far it would go," he said.

The transaction did go through - for about a minute. He said during that brief time he got a flood of information from Google users, though he was not able actually change the Google home page. Then he got an e-mail from Google canceling the transaction.

Related: Will Google pass Apple as most valuable company?

Ved worked for 5-1/2 years at Google, according to his LinkedIn page, and likes the company enough to have its logo as his profile picture on Facebook. He is now an MBA student at Babson College in suburban Boston.

Google (GOOGL) admits Ved owned the domain, albeit very temporarily. The company said that it offered him $6006.13, which is a numerical version of the word Google. "Squint a little and you'll see it," the company said in blog post about the incident.

When Google learned that Ved didn't intend to keep the money but instead donate it to charity, the company doubled the reward. Ved, who is from India, directed that the money be given to the Art of Living India Foundation. The group runs free schools in parts of that country where poverty and child labor are widespread.

Related: What we Googled in 2015

Google regularly pays people who discover security problems with its systems and notifies the company. It said the largest single award it paid last year was $37,500 to an Android security researcher. (We assume that's a human, not a humanoid robot who performs security research. But given how strange and quirky this entire story is, who knows).