Evidence suggests that settlements had begun in and around Petra in the eighteenth dynasty of Egypt (1550-1292 BCE). It is listed in Egyptian campaign accounts and the Amarna letters as Pel, Sela or Seir. Though the city was founded relatively late, a sanctuary existed there since very ancient times. Stations 19 through 26 of the stations list of Exodus are places associated with Petra. This part of the country was Biblically assigned to the Horites, the predecessors of the Edomites. The habits of the original natives may have influenced the Nabataean custom of burying the dead and offering worship in half-excavated caves. Although Petra is usually identified with Sela which means a rock, the Biblical references refer to it as "the cleft in the rock", referring to its entrance. 2 Kings xiv. 7 seems to be more specific. In the parallel passage, however, Sela is understood to mean simply "the rock" (2 Chr. xxv. 12, see LXX).
On the authority of Josephus (Antiquities of the Jews iv. 7, 1~ 4, 7) Eusebius and Jerome (Onom. sacr. 286, 71. 145, 9; 228, 55. 287, 94) assert that Rekem was the native name and Rekem appears in the Dead Sea scrolls as a prominent Edom site most closely describing Petra and associated with Mount Seir. But in the Aramaic versions Rekem is the name of Kadesh, implying that Josephus may have confused the two places. Sometimes the Aramaic versions give the form Rekem-Geya which recalls the name of the village El-ji, southeast of Petra. The Semitic name of the city, if not Sela, remains unknown. The passage in Diodorus Siculus (xix. 94–97) which describes the expeditions which Antigonus sent against the Nabataeans in 312 BCE is understood to throw some light upon the history of Petra, but the "petra" referred to as a natural fortress and place of refuge cannot be a proper name and the description implies that the town was not yet in existence.
The Rekem Inscription in 1976.
The only place in Petra where the name "Rekem" occurs was in the rock wall of the Wadi Musa opposite the entrance to the Siq. About twenty years ago the Jordanians built a bridge over the wadi and this inscription was buried beneath tons of concrete.
More satisfactory evidence of the date of the earliest Nabataean settlement may be obtained from an examination of the tombs. Two types have been distinguished: the Nabataean and the Greco-Roman. The Nabataean type starts from the simple pylon-tomb with a door set in a tower crowned by a parapet ornament, in imitation of the front of a dwelling-house. Then, after passing through various stages, the full Nabataean type is reached, retaining all the native features and at the same time exhibiting characteristics which are partly Egyptian and partly Greek. Of this type there exist close parallels in the tomb-towers at el-I~ejr in north Arabia, which bear long Nabataean inscriptions and supply a date for the corresponding monuments at Petra. Then comes a series of tombfronts which terminate in a semicircular arch, a feature derived from north Syria. Finally come the elaborate façades copied from the front of a Roman temple; however, all traces of native style have vanished. The exact dates of the stages in this development cannot be fixed. Strangely, few inscriptions of any length have been found at Petra, perhaps because they have perished with the stucco or cement which was used upon many of the buildings. The simple pylon-tombs which belong to the pre-Hellenic age serve as evidence for the earliest period. It is not known how far back in this stage the Nabataean settlement goes, but it does not go back farther than the 6th century BCE.
A period follows in which the dominant civilization combines Greek, Egyptian and Syrian elements, clearly pointing to the age of the Ptolemies. Towards the close of the 2nd century BCE, when the Ptolemaic and Seleucid kingdoms were equally depressed, the Nabataean kingdom came to the front. Under Aretas III Philhellene, (c.85–60 BCE), the royal coins begin. The theatre was probably excavated at that time, and Petra must have assumed the aspect of a Hellenistic city. In the reign of Aretas IV Philopatris, (9 BCE–40 CE), the fine tombs of the el-I~ejr type may be dated, and perhaps also the great High-place.
In 106 CE, when Cornelius Palma was governor of Syria, that part of Arabia under the rule of Petra was absorbed into the Roman Empire as part of Arabia Petraea, becoming capital. The native dynasty came to an end. But the city continued to flourish. A century later, in the time of Alexander Severus, when the city was at the height of its splendor, the issue of coinage comes to an end. There is no more building of sumptuous tombs, owing apparently to some sudden catastrophe, such as an invasion by the neo-Persian power under the Sassanid Empire. Meanwhile, as Palmyra (fl. 130–270) grew in importance and attracted the Arabian trade away from Petra, the latter declined. It seems, however, to have lingered on as a religious centre. A Roman road was constructed at the site. Epiphanius of Salamis (c.315–403) writes that in his time a feast was held there on December 25 in honor of the virgin Khaabou (Chaabou) and her offspring Dushara (Haer. 51).
The Nabataeans worshipped the Arab gods and goddesses of the pre-Islamic times as well as a few of their deified kings. One, Obodas I, was deified after his death. Dushara was the main male god accompanied by his female trinity: Al-‘Uzzá, Allat and Man?t. Many statues carved in the rock depict these gods and goddesses.
The Monastery, Petra's largest monument, dates from the 1st century BCE. It was dedicated to Obodas I and is believed to be the symposium of Obodas the god. This information is inscribed on the ruins of the Monastery (the name is the translation of the Arabic "Ad Deir").
Christianity found its way to Petra in the 4th century CE, nearly 500 years after the establishment of Petra as a trade center. Athanasius mentions a bishop of Petra (Anhioch. 10) named Asterius. At least one of the tombs (the "tomb with the urn"?) was used as a church. An inscription in red paint records its consecration "in the time of the most holy bishop Jason" (447). After the Islamic conquest of 629–632 Christianity in Petra, as of most of Arabia, gave way to Islam. During the First Crusade Petra was occupied by Baldwin I of the Kingdom of Jerusalem and formed the second fief of the barony of Al Karak (in the lordship of Oultrejordain) with the title Château de la Valée de Moyse or Sela. It remained in the hands of the Franks until 1189. It is still a titular see of the Catholic Church.
According to Arab tradition, Petra is the spot where Moses struck a rock with his staff and water came forth, and where Moses' brother, Aaron, is buried, at Mount Hor, known today as Jabal Haroun or Mount Aaron. The Wadi Musa or "Wadi of Moses" is the Arab name for the narrow valley at the head of which Petra is sited. A mountaintop shrine of Moses' sister Miriam was still shown to pilgrims at the time of Jerome in the 4th century, but its location has not been identified since.