Indus Maps › Legends and folklore › Raja Gira's Castle
Raja Gira's Castle
Hero or king · Raja Gira's Castle above Udegram, Swat, Khyber Pakhtunkhwa
See it on the map ›
Note for younger readers: A siege and a battle in which the hero dies; the story is about a conquest, told from the conquerors' side.
Above the village of Udegram in lower Swat, a ridge of bare rock climbs nearly two thousand feet, and along its crest run the broken walls of a fortress. The people of Udegram call it Raja Gira's Castle, after the last king who held Swat before Islam came.
The story says the king's stronghold could not be taken by storm. Its walls ran along a knife-edged crest with sheer cliffs on one side, and a massive buttressed bastion guarded the easiest way up. When the armies of Mahmud of Ghazni came up the valley, they camped below and laid siege. Tellers do not agree on how long it lasted: one old account says the siege dragged on for years.
What finally decided it, according to a version printed in 2016, was water: the fort drew its water from the Swat River below, and when that supply was cut, the defenders could not hold out. (The ruins themselves have a spring inside the walls.) The fortress fell. A local guide's version adds that Raja Gira escaped and fled north into Kohistan. The Torwali, Gawri and Kohistani people of the upper valleys, who call him their own last king, have their own endings. The Kohistani historian Gumnam Kohistani says he fled toward the upper Panjkora and died on the way; Dr Bilal of the Gawri community says he fell fighting at Barikot and Udegram. Both say his son, Raja Bira, then led their people on toward Dir.
The leader of the Muslim fighters, remembered as Pir Khushhal Baba and locally as Ghazi Baba, was killed in the fighting, and he lies buried where the valley opens out towards the village. His shrine stands among old graveyards and sacred groves; when Aurel Stein came in 1926, the ground around it was not ploughed or even planted with fruit trees, out of respect.
Below the castle, on a terrace of the same hill, archaeologists later uncovered the stone walls of a mosque. A marble slab found there says it was founded in the year 1048-49 by order of a Ghaznavid commander, and the Italian archaeologists who excavated it count it the oldest mosque known in northern Pakistan.
How it is told
The story is kept at Pir Khushhal Baba's shrine and by guides at Udegram, and as their own history by the Torwali, Gawri and Kohistani people; the Torwali writer Zubair Torwali told TNN in 2026, "We Torwalis also consider Raja Gira our last king." The same report mentions a daughter, Manja Devi, and tales of her and Pir Khushhal, which I could not find in full. The oldest written record I found is Aurel Stein's, from his tour of March-May 1926. He surveyed the ridge, noted that a single spring inside the walls was the only water within the defences and was specially guarded, and wrote down the 'pious tradition' that Pir Khushhal Baba led the faithful in Mahmud's army and took the fortress from the last king of Swat after a siege 'protracted for years'. Stein himself thought the stronghold far older and suggested it was Ora, a town Alexander took on his march through Swat. The cut-water ending is from the Express Tribune (2016), and Raja Gira's flight to Kohistan from a guide quoted in Dawn (2014); other online versions add details (salted horses, a supply line from Manglawar) that I could not trace to any source I was able to open, so they are left out. The archaeology is separate. An Arabic inscription on black marble found by chance in 1984 below the castle records the founding of a mosque in AH 440 (1048-49 CE) by order of a Ghaznavid amir, Nushtegin, known only from this inscription. The Italian Archaeological Mission then excavated the mosque and the settlement around it (1985-1999), and the Mission's own history calls it the oldest mosque in northern Pakistan and the third oldest in the country. Italian excavation later showed that the castle's own upper levels were a fortified Ghaznavid-period settlement (Dawn 2017), although Stein in 1926 had found no surface pottery of the years just before the conquest. Iranica counts the Udegram slab among probably the earliest monumental inscriptions in cursive Arabic script anywhere. Olivieri, quoted in Dawn (2016), dates Udegram's role as Swat's capital to the Hindu Shahi period, 8th-10th century, and Dawn reports the castle's main occupation as 7th-10th century, but the Department of Archaeology's site record gives 4th-2nd century BCE. The residential quarter round the mosque was deserted by the end of the 12th century.
Written down by outsiders
Parts of this story reach us through people from outside the community that tells it. Here is who they were, and what may colour their accounts.
- Aurel Stein (1926). A Hungarian-British archaeologist tracing Alexander's route through Swat. He noted the shrine tradition in passing as a 'pious tradition'; his interest was the ruins.
At a glance
- Tradition
- Told at Udegram, Swat, around the ziarat of Pir Khushhal Baba, and by the Torwali, Gawri and Kohistani people who count Raja Gira as their own last king
- Era
- Set in the 11th century, at the coming of the Ghaznavid armies; recorded by Stein in 1926 and still told by guides
- Place
- Raja Gira's Castle above Udegram, Swat, Khyber Pakhtunkhwa
Sources
- M. Aurel Stein, An Archaeological Tour in Upper Swat and Adjacent Hill Tracts, Memoirs of the Archaeological Survey of India 42 (1930), ch. II sec. iii 'Udegram and Raja Gira's Castle', pp. 34-41 (survey of the fortified ridge, the spring as the only water source inside the walls, the ziarat of Pir Khushhal Baba and the tradition of a siege 'protracted for years'; Stein's proposal that the site is Arrian's Ora). Tour made March-May 1926., Archaeological Survey of India (via Internet Archive)
- Luca M. Olivieri, 'Outline History of the IsIAO Italian Archaeological Mission in Pakistan (1956-2006)', East and West 56/1-3 (2006), pp. 23-41 (Gullini's early work at Udegram; the Ghaznavid mosque on Mt Raja Gira excavated under Scerrato in 1985, 1986, 1989, 1996 and 1999 after the inscription was found; 'the third oldest in Pakistan, but the oldest in the northern regions'; 'first, incomplete, Islamization of Swat in the 11th-14th century'), IsIAO, Rome (via Ca' Foscari University repository)
- Roberta Giunta, 'Ḡazni ii. Monuments and inscriptions', Encyclopaedia Iranica X/4 (2000, updated 2016), pp. 384-388 (the marble inscription 'from the Ghaznavid mosque at Rāja Gīrā in the Swāt Valley', dated 440/1048-49; with two Ghazni inscriptions, 'probably the earliest monumental cursive inscriptions in the Islamic world'; cites M. Nazir Khan, 'A Ghaznavid Historical Inscription from Uḍegrām, Swāt'), Encyclopaedia Iranica
- Fazal Khaliq, 'Scenic Swat attracts historians, archaeologists too' (inscription found 1984 below the 'castle', whose later levels were 'a fortified residential area of the Ghaznavid period'; mosque founded 1048-49 by order of the Ghaznavid amir Nushtegin, unknown from other sources; excavation 1985-1999; settlement abandoned by the end of the 12th century and used as a cemetery, with coins of the Khwarazm Shah in graves of the 1220s), Dawn
- Fazal Khaliq, 'Castle of last Hindu king Raja Gira in Swat crumbling' (L. M. Olivieri: Udegram the capital of Swat in the Hindu Shahi period, 8th-10th century; the castle 'captured by the Muslims after a fierce battle'; main occupation phases 7th-10th century; excavated by Italians from 1958), Dawn
- Jamal ud Din, 'Swat's Odigram village known for its archaeological sites' (a local guide's account: Mahmud's forces attacked Raja Geera, Pir Khushaal 'locally known as Ghazi Baba' played a vital role, the raja fled to Kohistan; mosque credited to 'Mansoor, nephew of Sultan Mehmood'), Dawn
- Sherinzada, 'A story of old: Raja Gira fort, in the crosshairs of time, neglect' (fort believed built 870-1000 CE; Mahmud's war; 'the water supply from the Swat River to the fort was cut off'), The Express Tribune
- Mahmud Ghaznavi Mosque (coordinates 34°44′36″N 72°18′51″E; tomb of Pir Khushal, popularly the Ghazi Baba tomb; mosque 28 x 21 m, hypostyle with wooden supports; the legend is given without a specific citation), Wikipedia
- Raja Gira's Castle, Udegram (site record 3342: dates the site 4th-2nd century BCE, 'Greek period'; gives 34.8722, 72.4189, which falls about 17 km north-north-east of the ruin and looks wrong; bibliography Stein 1930), Department of Archaeology and Museums, Government of Pakistan
- Alessandra Bagnera, The Ghaznavid Mosque and the Islamic Settlement at Mt. Rāja Gīrā, Udegram, ACT Field School Project Reports and Memoirs 5 (Lahore: Sang-e-Meel, 2015), 162 pp. (catalogue record only; the monograph itself was NOT read and should be checked before publication), CiNii Books catalogue record
- OpenStreetMap: 'Raja Gira Fort' (archaeological site, 34.7418, 72.3132) and 'Mahmud Ghaznavi mosque' (34.7431, 72.3143), via Nominatim, OpenStreetMap contributors
- Raja Gira: the forgotten ruler whose legacy still shapes Swat's tribal identity (Uzma Iqbal, 2026), TNN English