[3] By around 788 BCE, a systematic government of a large settlement of Malay native of Kedah had been established around the northern bank of the Merbok River.
[4][5] Around 170 CE, groups of Hindus arrived at Kedah, who were soon joined by peoples from nearby islands and from the northern Mon-Khmer region.
At the same time, traders from India, Persia and the Arabian Peninsula arrived at the brink of the Malacca Strait, using Gunung Jerai (the Kedah Peak) as a marking point.
[6] According to the At-Tarikh Salasilah Negeri Kedah, written by Muhammad Hassan bin Dato' Kerani Muhammad Arshad in 1928, in around 630 CE, Maharaja Derbar Raja of Gombroon (now known as Bandar Abbas) in Persia was defeated in battle and escaped to Sri Lanka, and was later blown off course by a storm to the remote shores of Kuala Sungai Qilah, Kedah.
In 634 CE, a new kingdom was formed in Kedah consisting of Persian royalty and native Malay people of the Hindu faith; the capital was Langkasuka.
However, historian Richard Winstedt, quoting an Acehnese account, gave 1474 as the year of conversion to Islam by the ruler of Kedah.
He achieved this by assuring Sultan Muhammad Jiwa Zainal Adilin II that his army would protect Kedah from any Siamese invasion.
The EIC, with the help of the British military made a preemptive strike and attacked Kedah's navy and fort in Seberang Perai, damaging them.
On 7 July 1800, while George Alexander William Leith was Lieutenant-Governor of Penang, a treaty came into effect that gave the British sovereignty over Seberang Perai, subsequently named Province Wellesley.
[11] While the acquisition improved Penang Island's military and food security, for Kedah it provided a protective strip against enemy attack from the sea.
This period marked the exile of Sultan Ahmad Tajuddin Halim Shah II[16] and the imposition of direct Siamese rule on Kedah for a time.
Tengku Kudin, a nephew of Sultan Ahmad Tajuddin, captured Alor Setar from the Siamese in 1831[17] but the town was retaken soon after.
[19] The historicity and the dating of the list of rulers however is questionable as Kedah may have remained Hindu-Buddhist until the 15th century when its king converted to Islam.
The beginning of the use of the title sultan in Kedah is attributed to a visit by a Muslim scholar from Yemen, Sheikh Abdullah bin Ja'afar Quamiri, to Durbar Raja II's palace at Bukit Meriam in 1136.