The region around Madaba has been inhabited for around 4500 years. The biblical Moabite town of Medeba was one of the towns divided among the 12 tribes of Israel at the time of the Exodus. It's also mentioned on the famous Meshe Stele, raised in about 850 BC by the Moabite king Mesha to commemorate his victory over the Israelites.
By 165 BC the Ammonites were in control of Madaba; about 45 years later it was taken by Hyrcanus I of Israel, and then promised to the Nabataeans by Hyrcanus II in return for helping him recover Jerusalem. Under the Romans from AD 106, Madaba became a prosperous provincial town with the usual colonnaded streets and impressive public buildings. The prosperity continued during the Christian Byzantine period, when there was a large drive towards church construction; most of the mosaics in Madaba date from this period.
The town was eventually abandoned for about 1100 years after a devastating earthquake in AD 747. In the late 19th century, 2000 Christians from Karak migrated to Madaba after a bloody dispute with Karak's Muslims and within their community. They found the mosaics when they started digging foundations for houses. News that a mosaic map of the Holy Land had been found in St George's Church in Madaba reached Europe in 1897, leading to a flurry of exploratory activity that continues to this day.
The well-governed town has plans for a restoration project in the town's souq, which might be worth keeping an eye on over the next few years.