The origin of the Arabic script goes back to the first alphabets which were created by the Phoenicians. The Phoenicians were living on the coastal area of Lebanon, Palestine and Syria. Since the Phoenicians were business traders sailing the Mediterranean, the alphabet influenced all the Mediterranean nations. The location of the middle-east being in the center of the ancient world (between the east and the west) also played a part in the spreading of the alphabet. So that is why the Phoenician alphabet is the mother of the Latin as well as the Arabic script
In 1300 BC, the early Phoenician alphabet (consisting of 22 consonants without capitals written from right to left) was born in the city of Byblos on the coastal side of Lebanon. In 1000 BC, the Aramaic alphabet originated from the Phoenician in Aram (Syria and Mesopotamia) which represented the language of the Arameans. In 100 BC, the Nabatean script was born in the city of Petra north of the Red Sea (present day Jordan) and spread all over the middle-east. In 100 AD, the Syriac alphabet (22 letters) was created in Mesopotamia developing also from the Aramaic. Mid of the first century, the early Arabic alphabet was created in Kufa (Iraq). The old kufi (Archaic Kufi) contested of around 17 letters forms without diacritic dots or accents. Afterwards the diacritic dots and accents were added in order to help pronunciation and the set of Arabic letters rose to 29 (including the Hamza). With the birth of Islam, the Quran became the reason to reform all the Arabic scripts found in Arabia. One unified well structured Arabic script with 29 letters was developed for the writing of the holy scripts of the Quran in the 7th century AD. Primarily the Quran was written with the Quranic kufi script and later it was written with the Quranic Naskh style. From its creation in the Arabian Peninsula, the Arabic alphabet spread to all of the middle-east, northern Africa and even reached Spain due to Islamic conquests. Since Arabic was the language of the Quran hence of God, all the occupied nations were forced to use the Arabic language.