Then a war happened.
Offense Army: King Amraphel of Shinar - King Arioch of Ellasar - King Chedor-Laomer of Elam and Tideal
Defense Army: King Bera of Sodom - King Birsha of Gomorrah - King Shinab of Admah - King Shemeber of Zeboiim - King Zoar of Bela
The war happened in the Valley of Siddim, the Salt Sea.
The two armies confronted each other there, because the Kings of the Offense Army was the rulers of the Defense Army's kings as well for 12 years, and the kings of the Defense Army rebelled. The kings of Sodom and Gomorrah however lost the battle. The survivors fled into the hills to save their own lifes.
The kings of the Offense Army then took all the goods of Sodom and Gomorrah, and all their fictuals with them. They even took Lot and his goods with them.
But an escapee immediately went to Abram the Hebrew to tell him that Lot was taken prisoner. Abram was dwelling in the plain of Mamre, whom was brother to Eshcol and Aner. They were all allies to Abram. When Abram heard that Lot was kidnapped, he immediately got together a posse and he went after the looters. He called upon his 318 slaves to take up their arms and to immediately pursue the enemy.
Abram caught up with them late that night by a place called Dan. Abram's men then quietly surrounded the camp and then they attacked and slayed the sleeping men. Abram and his men then pursued survivors up to a place called Goba, north of Damascus. After finishing off the enemy, Abram returned victorious with all the stolen goods as well as Lot with his family and goods ... and with the people that was taken as slaves. The king of Sodom went out to greet him as a hero in the valley of Shaveh ... and Melchizedek, king of Salem, brought Abram bread and wine.
Melchizedek was the priest of the most high God. He blessed Abram and said to him: 'May Abram be blessed by The Almighty God, Possessor of heaven and earth. Praise to The Lord for delivering the enemy into Abram's hands.'
Abram gave Melchizedek a 10th of everything he came back with. The king of Sodom turned to Abram and offered him all the goods, he only wanted the people. Abram declined the offer and told him that he, Abram would not even take a thread from the king, because he wasn't going to allow the king to take any credit whatsoever for his, Abram's success when it comes ... but Abram insisted on a fair share for his friends ... Aner, Eschol and Mamre.
He then thanked the king for feeding his men and he was on his way.
Source: The Bible: Genesis 14