The endogenous name for the country was Mueang Thai (เมืองไทย). The word "Thai" is derived from the ethnonym Tai, which refers to the Tai peoples who migrated to the region from southern China. The term "mueang" means "city" or "country," so Mueang Thai literally translates to "Thai country."
In 1939, the government of King Rama VII officially changed the country's name from Siam to Thailand. The change was made as part of a nationalistic movement to promote Thai identity and to reflect the country's cultural heritage. The name Thailand was chosen because it was derived from the endogenous Mueang Thai and was considered more appropriate and representative of the country.