One is hard pressed if you wish to say it is the Judeo-Christian-Islamic God who grants this right. The Hebrew Bible dates from the 9th Century BC. The New Testament dates about the First or Second Centuries, maybe Third Century AD, if you want to place some latitude in there since it is pretty much accepted the New Testament was written during the First century AD. The First Council of Nicaea (325AD) is credited with setting the Bible as it is currently accepted. [1]
You might get closer if you are willing to accept that the term "Allah" just means "god" without any monopoly of that being Islamic since the Quran was written in the Seventh Century. You might get away with saying the Quran was written in the Eight Century. That gets you close.
I say that because Gunpowder was invented in China during the late Tang dynasty (9th century) with the earliest record of a written formula appeared in the Song dynasty (11th century).
You would think that if a deity were involved here, Gunpowder would have been invented much earlier! This argument reminds me of the The Jatravartids in The Hitchhiker’s Guide to the Galaxy, who, are small blue creatures with more than fifty arms each and are unique in being the only race in history to have invented the aerosol deodorant before the wheel. [2] You would think if a deity wanted people to have guns he would have produced them closer to when he was alleged to have created humans.
You're a bit hard pressed if you want to say humans have only been on the earth for 7 millennia and guns only popped up in the last one of them.
We can also get into the fact that early firearms were prone to exploding (modern ones can as well). That was due to not having strong enough metal to handle the explosive power of gunpowder: even early gunpowder.
Doesn't sound like any god was too keen on a Prometheus giving this fire to humans to me.
That said we can get into the fact that firearms are conspicuously absent of most accepted religious texts. Revelation is always notoriously debatable. [3]
Religion has no place in the Constitutional framework as Article VI of that document points out (that's the same provision that says Obama can be a Muslim and President):
This Constitution, and the Laws of the United States which shall be made in Pursuance thereof; and all Treaties made, or which shall be made, under the Authority of the United States, shall be the supreme Law of the Land; and the Judges in every State shall be bound thereby, any Thing in the Constitution or Laws of any State to the Contrary notwithstanding.I've pointed out before that rights usually require some form of legal basis to be valid. Anyone can claim anything as a right, but that means nothing unless there is some real basis for the right.[4]
The US is a secular society for good reason, which is that we don't want other people imposing their religion upon us.[5] The US was founded on religious freedom for the reason that people can use religion to oppress others.
Otherwise, why would you care if Obama were a Muslim or not?
Actually, claiming a supernatural deity gives you a right to a a firearm opens up a large can of worms. This was intended to point of the problems of saying a deity who commanded not to kill (or murder if you want to split hairs) gives you a right to an object which breaks that commandment. It is not a legal stretch of say the first amendment applies to the internet (or broadcast media), but it is a stretch to say an all knowing, all powerful deity somehow forgot to make firearms on the eighth day: especially if doing so would violate his commandments.
Notes:
[1] We can debate books of the Bible, but the Council did set forth the Bible as is commonly used. Now we can have a seriously fun and nonproductive debate if you wish to use apocryphal works: MY APOCRYPHAL WORKS SAY YOU ARE WRONG! WRONG! WRONG! WRONG! WRONG! WRONG!
[2] Suitably religious in tone:
"In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move. Many races believe that it was created by some sort of God, though the Jatravartid people of Viltvodle VI believe that the entire Universe was in fact sneezed out of the nose of a being called the Great Green Arkleseizure.
The Jatravartids, who live in perpetual fear of the time they call The Coming of The Great White Handkerchief, are small blue creatures with more than fifty arms each, who are therefore unique in being the only race in history to have invented the aerosol deodorant before the wheel.
However, the Great Green Arkleseizure Theory is not widely accepted outside Viltvodle VI and so, the Universe being the puzzling place it is, other explanations are constantly being sought." --Douglas Adams, The Hitchhiker’s Guide to the Galaxy [3]See above: My revelation says YOU ARE WRONG! WRONG! WRONG! WRONG! WRONG! WRONG!
[4] Again, see above. MY GOD SAYS YOU ARE WRONG! WRONG! WRONG! WRONG! WRONG! WRONG!
[5] Again, see above. MY GOD SAYS YOU ARE WRONG! WRONG! WRONG! WRONG! WRONG! WRONG!