Ahmad Tajuddin Halim Shah II of Kedah

Paduka Sri Sultan Ahmad Tajuddin Halim Shah II ibni al-Marhum Sultan Abdullah Mukarram Shah (Jawi: ڤدوك سري سلطان أحمد تاج الدين حليم شاه ٢ ابن المرحوم سلطان عبد الله مكرم شاه; died 3 January 1845) was the 22nd Sultan of Kedah and reigned from 1803 to 1821 and again from 1842 to 1845.

He was appointed as heir apparent (Uparaja) by the King of Siam and invested with the title of Chao Pangeran in 1799. He became the Sultun of Kedah in September 1803 upon the forced abdication of his paternal uncle Sultan Dziaddin Mukarram Shah II. He was recognised as ruler of Kedah by the King of Siam, and installed at the Balai Besar, Kota Star Palace, Alor Star, on 19 September 1804 with the title of Phaya Ratna Sangrama Ramabhakti Sri Sultan Muhammad Ratna Raja Varman. He was promoted to the rank of Chao Phya Ratna Sangrama Ramabhakti Sri Sultan Muhammad Ratna Raja “Bodin Tersurin Terwerei” Varman Chao Phya Seraipuri on 2 August 1811. On hearing about a planned invasion of Siam by Burma in 1820, he refused to dispatch the annual bunga mas tribute to Bangkok and opened negotiations for a Burmese alliance. The Governor of Ligor then invaded Kedah on 12 November 1821, and captured Kedah Fort on the 18th of the same month.

The Sultan fled to British territory, the Governor of Ligor appointing his son as acting Governor. The British authorities granted the Sultan asylum and a pension, allowing him to live in exile, first at Penang, and later at Malacca. In 1842, after several failed attempts at regaining his throne by force, he sent his sons to Bangkok to negotiate his restoration. The Siamese had divided Kedah into four petty states in 1841, of which they offered him the southern, largest and most prosperous one. He agreed to this offer and was permitted to return as nominal ruler over his much reduced realm in June 1842. He expanded his territory by seizing Krian from Perak on 20 December 1842. He established his capital at Kota Kuala Muda as Alor Star was overgrown with forest and vegetation.

Local Kedahan Arab families had supported the Sultan's efforts to lead resistance efforts against Siamese rule. Arab leaders employed a two-pronged approach of religious militancy and diplomacy to free Kedah from Siamese rule, among which the Jamallulail family played a leading role in these efforts and often carried out negotiations to persuade the Siamese to regain the state's independence. In 1843, Syed Hussein Jamallulail was installed as the first Raja of Perlis, after Sultan Ahmad Tajuddin gave his endorsement for the formation of the Perlis state.