Here we have an account where the Lord commands Joshua to destroy the city of Ai. Joshua follows these commands and slaughters 12,000 inhabitants of Ai:
Joshua 8:18 And the LORD said unto Joshua, Stretch out the spear that is in thy hand toward Ai; for I will give it into thine hand. And Joshua stretched out the spear that he had in his hand toward the city.
8:19 And the ambush arose quickly out of their place, and they ran as soon as he had stretched out his hand: and they entered into the city, and took it, and hasted and set the city on fire.
8:20 And when the men of Ai looked behind them, they saw, and, behold, the smoke of the city ascended up to heaven, and they had no power to flee this way or that way: and the people that fled to the wilderness turned back upon the pursuers.
8:21 And when Joshua and all Israel saw that the ambush had taken the city, and that the smoke of the city ascended, then they turned again, and slew the men of Ai.
8:22 And the other issued out of the city against them; so they were in the midst of Israel, some on this side, and some on that side: and they smote them, so that they let none of them remain or escape.
8:23 And the king of Ai they took alive, and brought him to Joshua.
8:24 And it came to pass, when Israel had made an end of slaying all the inhabitants of Ai in the field, in the wilderness wherein they chased them, and when they were all fallen on the edge of the sword, until they were consumed, that all the Israelites returned unto Ai, and smote it with the edge of the sword.
8:25 And so it was, that all that fell that day, both of men and women, were twelve thousand, even all the men of Ai.
8:26 For Joshua drew not his hand back, wherewith he stretched out the spear, until he had utterly destroyed all the inhabitants of Ai.
8:27 Only the cattle and the spoil of that city Israel took for a prey unto themselves, according unto the word of the LORD which he commanded Joshua.
8:28 And Joshua burnt Ai, and made it an heap for ever, even a desolation unto this day.
But then we have an account where Joshua makes an offering to the Lord. He then writes upon the stones the law of Moses and then proceeds to read the entire thing to the assembled people of Israel.
8:30 Then Joshua built an altar unto the LORD God of Israel in mount Ebal,
8:31 As Moses the servant of the LORD commanded the children of Israel, as it is written in the book of the law of Moses, an altar of whole stones, over which no man hath lift up any iron: and they offered thereon burnt offerings unto the LORD, and sacrificed peace offerings.
8:32 And he wrote there upon the stones a copy of the law of Moses, which he wrote in the presence of the children of Israel.
8:33 And all Israel, and their elders, and officers, and their judges, stood on this side the ark and on that side before the priests the Levites, which bare the ark of the covenant of the LORD, as well the stranger, as he that was born among them; half of them over against mount Gerizim, and half of them over against mount Ebal; as Moses the servant of the LORD had commanded before, that they should bless the people of Israel.
8:34 And afterward he read all the words of the law, the blessings and cursings, according to all that is written in the book of the law.
8:35 There was not a word of all that Moses commanded, which Joshua read not before all the congregation of Israel, with the women, and the little ones, and the strangers that were conversant among them.
Now, the law of Moses is the Torah, or the first five books of the old testament. As I'm sure you're all aware, this includes the ten commandments, including the commandment "You shall not kill."
Exodus 20:13 You shall not kill.
Deuteronomy 5:17 You shall not kill.
So we have Joshua, who has just taken part in the slaughter of 12,000 people of Ai, reminding his own people that "You shall not kill." There is either a glaring contradiction here, or the commandment "You shall not kill" has been greatly misunderstood. I think it is the latter.
Clearly the Lord has no problem with killing, or with ordering his loyal minions to kill in his name. He does both on numerous occasions throughout the bible.
Clearly Joshua has no problem with killing 12,000 people of Ai.
What the commandment means is that 'you shall not kill fellow Israelites.' It's perfectly OK to kill infidels by the score.
The whole point of this post is to pose a specific question to Christians: How do you reconcile this account with the claim that God and the bible are the source of all morality?