Teyma is usually associated with the ancient oasis of Tayma, located northeast of the Hijaz district, on the trade route between Tathrib (Medina) and Dumah. Between Tayma and Dumah is the famous Nafud desert. It is thought that the present city of Tayma at the southwestern end of the great Nafud desert is built on the remains of the ancient oasis by the same name.
Tiglath Pileser III received tributes from Tayma, as well as from other Arabian oasis. The Assyrian recorded recall how a collation headed by Samsi, queen of the Arabs was defeated. The coalition was made up of Massaa, the city of Tayma, the tribes of Saba, Hajappa, Badana, Hatti, and Idiba'il, which lay far to the west. Once defeated, these tribes had to send tribute of gold, silver, camels and spices of all kinds.
The Assyrian king, Sennacherib even named one of his gates in the great city of Nineveh as the Desert Gate, and records that "the gifts of the Sumu'anite and the Teymeite enter through it." From this we can recognize Teyma as being an important place.
Around 552 BC, the Babylonian king, Nabonidus (555-539 BC) the father of biblical Belshazzar (Daniel 7:1) made the city of Tayma his residence and spent ten of the sixteen years of his reign there.
During the Achaemenid period, the city probably became a seat of one of the Persian emperors.
However, by the first century BC, the Nabataeans began to dominate Tayma and it slowly became a part of their trading empire.
Isaiah 21:13-14 Invites the people of Tayma to provide water and food for their fugitive countrymen, in an apparent allusion to Tiglath Pileser's invasion of North Arabia in 738 BC.
Jeremiah 25:23 records a prophecy against the oasis city
Job 6:19,20 Job laments at his fall from wealth, and comments that the troops of Tema and the armies of Sheba (Yemen) had hoped for plunder, but now Job had nothing.
Is it spelled Tema, Teima, or Teyma?