[1] It was originally de facto independent, but later became a vassal state of the Siamese Rattanakosin Kingdom and the Vietnamese Nguyễn dynasty in the 18th and 19th century prior to its annexation by the latter in 1832.
Along with Phố Hiến, Hoi An, and Saigon, Hà Tiên was a major Chinese community center and important hub of Ming loyalist networks in premodern Indochina.
[5] The name of the principality was variously spelled as Hexian Zhen (河仙鎮),[2] Nangang (南港), Gangkou (港口), Bendi (本底) or Kundama (昆大嗎) in Chinese,[6] Phutthaimat (พุทไธมาศ) or Banthaimat (บันทายมาศ) in Thai, Ponthiamas, Pontheaymas and Pontiano in French, Panthai-mas, Bantaimas, Pontiamas, Pontaimas, Bantay-mas, Banteay M'eas, Pontiamas, Pontiamasse, Po-taimat,[7] Can Cao, Cancar, and infinite other variations.
In the late 17th century, a Chinese refugee, Mok Kiu (the Vietnamese called him Mạc Cửu), who had fled his homeland in Leizhou peninsula back then in 1671, was granted the Khmer title Oknha (ឧកញ៉ា, "marquess") by Cambodian king.
However, Siamese sources called the Hà Tiên rulers Phraya Rachasethi (พระยาราชาเศรษฐี), thus confusing them with the Khmer governor.
After War of the second fall of Ayutthaya, Mạc Thiên Tứ tried to install Prince Chao Chui (เจ้าจุ้ย, Chiêu Thúy in Vietnamese) as the new Siamese king, but was defeated by Taksin.
[11] Hà Tiên was completely devastated by Siamese troops in 1771,[9] Mạc Thiên Tứ had flee to Trấn Giang (modern Cần Thơ).
The Nguyễn regime was overthrown in 1777, Mạc Thiên Tứ refused to surrender to Tây Sơn rebels, and fled to Siam.
When the Siamese fleet landed in Banteay Meas, an army under Mạc Tử Sinh and Phraya Thatsada was to reinforce them.
Nguyễn Ánh returned to Vietnam and retook Gia Định (present-day Ho Chi Minh City) in 1787.
Chinese researcher Dai Kelai (戴可来) stated that Mạc Tử Sinh was probably a puppet ruler installed by Siam.
Not long after Mạc Tử Sinh died, Ngô Ma (吳魔) briefly served as acting ruler.