Police on Thursday returned 5.95 million yen in cash to a Gunma Prefecture man who had sent the funds anonymously to six public entities in early June.

According to police in Tokyo and Gunma Prefecture, the sender was a 38-year-old unemployed man residing in the city of Takasaki. The money was returned to him as stipulated under the Lost Property Law.

The man was quoted as telling investigators that he had wanted the money to be put to good use.

The money was placed in six envelopes -- addressed to the Finance Ministry, the health ministry, the Social Insurance Agency, the Meteorological Agency, the Board of Audit and the Gunma Prefectural Library -- and placed in the same mailbox in Takasaki on June 10, investigators said. There was no note with the cash.

The man's father read about the mysterious cash in the newspaper and contacted local police on June 13, saying his son may have been the sender.

After receiving the necessary reports from those who received the money, investigators analyzed the handwriting on the envelopes and determined it matched the man's. When questioned, he confirmed he was the sender and said he would like the money back, police said.