Islamic belief holds that God taught David the making of armour. the Qur'an says the 'iron was made soft for him', through which David could make instruments for protection against enemies. However, the rule in this story is to use weapons of defense only in true war (e.g., if you are fighting for freedom of worship) and not to simply use weapons for degenerate violence. Later accounts in Muslim literature have references to David's armor-making abilities. God says in the Qur'an:
We favoured David with excellence, (and commanded): "O mountains and birds, glorify the greatness of God with him." And We made iron pliable for him.
"Make long coats of mail," (We said), "and fix their links, and do the right. I surely see whatsoever you do."
—Qur'an, sura 34 (Saba), ayat 10-11