The site is located on a cliff, about 1000 meters above sea level, surrounded on three sides by a valley. It has been inhabited since at least the Iron Age, and was an important city for the Moabites and the Nabateans. In the Bible it is called Qer Harreseth, and the Romans conquered it from the Nabateans in 105. Under the Byzantine Empire it was a bishopric, and remained predominantly Christian under the Arabs.
Construction of the Crusader castle began in the 1140s, under Paganus, the butler of King Fulk. The Crusaders called it Crac des Moabites. Paganus was also Lord of Oultrejordain (Transjordan), and Kerak became the centre of his power. Because of its position east of the Jordan River, Kerak was able to control Bedouin herders as well as the trade routes from Damascus to Egypt and Mecca.
In 1176 Raynald of Chatillon gained possession of Kerak after marrying Stephanie, the daughter of Humphrey of Toron. From Kerak, Raynald harassed the trade caravans and even attempted an attack on Mecca itself. In 1184 Saladin besieged the castle in response to Raynald's attacks. The siege took place during the marriage of Humphrey and his second wife Isabella, and Saladin agreed not to target their chamber while his siege machines attacked the rest of the castle. The siege was eventually relieved by King Baldwin IV.
After the Battle of Hattin in 1187, Saladin besieged Kerak again and finally captured it in 1189. During the siege the defenders were forced to sell women and children into slavery for food.
The castle of Kerak is a notable example of Crusader architecture, a mixture of European, Byzantine, and Arab designs. It is now in ruins, but a city of about 170 000 people has been built up around it. The castle has a museum dedicated to the Crusader period.