Ajam (عجم) in Arabic means non-Arabic-speaker. Ajam is an Arabicized word that came from Jam or jamshid the name of a A Persian legendary king or prophet ,according to old stories he was the king able to fly around the world by a throne or Carpet.
Keshvare Ajam used to mean "Persia (Iranians)" in a letter from the Ottoman Empire to Iranian emperor Mohammad Shah Qajar in 1839