Although famous for the Nabatean period, the region of Petra had been inhabited long before the Nabateans arrived in the 7th century BC - a settlement over 9000 years old has already been found. They arrived slowly and were firmly established in the 4th century BC. Of nomandic origin, the Nabateans settled in Petra where they created a ingenious system of cisterns and chanels to take advantage of all the water they could get. With this guaranteed water supply, Petra became a perfect stop for caravans in the silk and spice trade routes whick linked the Mediterranean to China and India. They prospered by charging the caravans for the hospitality and protection. Nabateans spoke a dialect of Aramaic and had many gods.
At its height, the Nabatean Kingdom reached as far as Damascus, in present-day Syria. Petra had a population of about 30000 people by then, in the middle of 1st century AD. Slowly the Romans arrived in the area and soon Petra was taken. It still flourished under the Romans and later, in the 4th century AD, the Byzantine. Earthquakes emptied the area, Crusaders built fortifications in the 12th century and until the 15th century it was still a stopping place for caravans.
Forgotten to the world, except to the bedouins who lived in the area, the fabled Nabatean capital was rediscovered by the Swiss explorer John Lewis Burckhart. He disguised himself as a Muslim from India (I wonder how a Swiss can have done that) and was forced to conceal his excitement when he crossed the narrow passages and entered the site.