|Languages||Sanskrit, Minang, and Melayu|
Pagaruyung (also Pagarruyung, Pagar Ruyung and, Malayapura or Malayupura) was the seat of the Minangkabau kings of Western Sumatra, though little is known about it. Modern Pagaruyung is a village in Tanjung Emas subdistrict, Tanah Datar regency, located near the town of Batusangkar, Indonesia.
Adityawarman is believed to have founded the kingdom and presided over the central Sumatra region between 1347 and 1375, most likely to control the local gold trade. The few artifacts recovered from Adityawarman’s reign include a number of stones containing inscriptions, and statues. Some of these items were found at Bukit Gombak, a hill near modern Pagarruyung, and it is believed a royal palace was located here.
There is a major gap in the historical picture in the Minangkabau highlands between the last date of Adityawarman’s inscription in 1375 and Tomé Pires Suma Oriental, written sometime between 1513 and 1515.
By the 16th century, the time of the next report after the reign of Adityawarman, royal power had been split into three recognized reigning kings. They were the King of the World (Raja Alam), the King of Adat (Raja Adat), and the King of Religion (Raja Ibadat). Collectively they were called the Kings of the Three Seats (Rajo Tigo Selo).
The first European to enter the region was Thomas Dias, a Portuguese employed by the Dutch governor of Malacca. He traveled from the east coast to reach the region in 1684 and reported, probably from hearsay, that there was a palace at Pagaruyung and that visitors had to go through three gates to enter it. The primary local occupations at the time were gold panning and agriculture, he reported.
A civil war started in 1803 with the Padri fundamentalist Islamic group in conflict with the traditional syncretic groups, elite families and Pagarruyung royals. During the conflict most of the Minangkabau royal family were killed in 1815, on the orders of Tuanku Lintau.
The British controlled the west coast of Sumatra between 1795 and 1819. Stamford Raffles visited Pagarruyung in 1818, reaching it from the west coast, and by then it had been burned to the ground three times. It was rebuilt after the first two fires, but abandoned after the third and Raffles found little more than waringin trees.
The Dutch returned to Padang in May 1819. As a result of a treaty with a number of penghulu and representatives of the murdered Minangkabau royal family, Dutch forces made their first attack on a Padri village in April 1821.
The prestige of Pagaruyung remained high among the Minangkabau communities in the rantau, and when the members of the court were scattered following a failed rebellion against the Dutch in 1833, one of the princes was invited to become ruler in Kuantan.
Palace replica 
A building was built in 1976 to represent the original Pagaruyung palace, and open to the public as a museum and tourist attraction. It was built in the traditional Minangkabau Rumah Gadang architectural style, but had a number of atypical elements including three stories. The palace was destroyed by fire on the evening of February 27, 2007 after the roof was struck by lightning.
- Gallop, Annabel Teh (2002). Malay seal inscriptions: a study in Islamic epigraphy from Southeast Asia. Volume II. School of Oriental and African Studes, University of London. p. 137. British Library, ILS catalogue number: 12454119. Unknown parameter
- Casparis, J.G. (1975). Indonesian palaeography: a history of writing in Indonesia from the beginnings to C. A, Part 1500. E. J. Brill. ISBN 978-90-04-04172-1.
- (Dutch)Bosch, FDK (1931). De rijkssieraden van Pagar Roejoeng Overdr. uit het Oudheidkundig Verslag 1930, Batavia. pp. 49–108.
- Cortesão, Armando, (1944), The Suma Oriental of Tomé Pires, London: Hakluyt Society, 2 vols.
- Ambler, John S. (1988). "Historical Perspectives on Sawah Cultivation and the Political and Economic Context for Irrigation in West Sumatra". Indonesia (Southeast Asia Program Publications at Cornell University) 46 (46): 39–77. doi:10.2307/3351044. JSTOR 3351044.
- Colombijn, Freek (2005). "Islamic influences on urban form in Sumatra in the seventeenth to nineteenth centuries CE". Modern Asian Studies 39 (1): 1. doi:10.1017/S0026749X04001374.
- Anon, (1893), Mededelingen...Kwantan. TBG 36: 325–42.
- The Jakarta Post - The Journal of Indonesia Today
- Dobbin, Christine (1977). "Economic change in Minangkabau as a factor in the rise of the Padri movement, 1784-1830.". Indonesia (Southeast Asia Program Publications at Cornell University) 23 (1): 1–38. doi:10.2307/3350883. JSTOR 3350883.
- Miksic, John (2004). "From megaliths to tombstones: the transition from pre-history to early Islamic period in highland West Sumatra.". Indonesia and the Malay World 32 (93): 191. doi:10.1080/1363981042000320134.
- Drakard, Jane (1999). A Kingdom of Words: Language and Power in Sumatra. Oxford University Press. ISBN 983-56-0035-X.