Mikhail Kalashnikov, inventor of the AK-47 assault rifle, reportedly wrote to the head of the Russian Orthodox Church before his death describing his "spiritual pain" at those killed by the weapon he designed.

Mr Kalashnikov, who died in December aged 94, wrote an emotional letter to Russia’s Patriarch Kirill in April, according to Izvestia, a pro-Kremlin newspaper.

He said: "My spiritual pain is unbearable. I keep having the same unsolved question: if my rifle took away people's lives, then can it be that I ... am guilty for people's deaths, even if they were enemies?"

"The longer I live, the more this question drills itself into my mind and the more I wonder why the Lord allowed man to have the devilish desires of envy, greed and aggression.

"Why did he allow thoughts of killing brothers and the evil to burst out of humankind?"

Kalashnikov was wounded in action as a Soviet Army tank commander in 1941. He is said to have begun working on new designs to alleviate the shortage of small arms he had witnessed at the front even as he lay recovering in his hospital bed.

The relative simplicity of the Kalashnikov, or AK-47, made it cheap to manufacture, reliable, and easy to maintain. It was adopted for standard issue by the Soviet Army and became one of the world's most familiar and widely-used weapons.

Mr Kalashnikov himself made little money from his design, but was feted as a Hero of Russia and twice named a Hero of Socialist Labour. He was also awarded the Order of the Red Star and Stalin Prize First Class. President Vladimir Putin attended his funeral.

One of 18 children born in southern Siberia, Mr Kalashnikov wrote that designing the AK-47 had been his destiny.

He said: "My destiny thus ordered that yesterday’s man from Altai, son of dispossessed peasants who were sent to Siberia, a tank driver and a senior sergeant became an arms constructor who was capable, within four years, of fulfilling his dream about the miracle weapon: the AK-47 rifle."

But Kalashnikov's pride at an invention designed to help defend his country was tempered with sadness at its subsequent use by criminals and child soldiers.

One of 18 children, Kalashnikov was wounded in action as a tank commander

He wrote despairingly to the Patriarch of the "evil" he saw around him: "Yes, the number of churches and monasteries in our land is increasing, but the evil is still not waning!

"Good and evil live as neighbours to each other, they fight each other and the most frightening thing is that they are at peace with one another in people’s souls - this is the conclusion I came to at the sunset of my mortal life."

"It’s like an eternal engine of some kind, which I wanted to invent so much in my younger life. Light and shadow, good and evil - two contradictory sides of one whole, not able to exist without one another? Did the Lord really design it so? Will humanity trudge alone forever in this state?"

The Patriarch's press secretary, Alexander Volkov, told Izvestia that the Russian Church leader received the letter and wrote a personal reply.

He said: "The Church has a very definite position: when weapons serve to protect the Fatherland, the Church supports both its creators and the soldiers who use it.

"He designed this rifle to defend his country, not so terrorists could use it in Saudi Arabia."

The Russian Orthodox Church has built close ties with state agencies and powerful officials since the demise of the Soviet Union.

Mr Kalashnikov wrote that he first went into a church at the age of 91 and was later baptised. It would have been unthinkable for him to have expressed an interest in religion under Soviet rule.

His daughter Yelena told Izvestia she believed a priest had helped her father to compose the letter.