But inside that boundary, inside Pakistan, is another frontier, also enshrined in laws drawn up by the British Raj. It divides "settled areas" from "tribal agencies" - the range of rocky hills 20-50 miles deep where Pathan tribesmen live, obeying no laws but their own.
In the hamlet of Chapri, a stone arch marks the division. On one side is a modern democracy, on the other a land ruled by centuries-old traditions. Under Pakistan's constitution, the writ of the government only covers the local metalled roads and there are few metalled roads in tribal territory.
Chapri is not a striking place. A few mud huts, a concrete mosque, and the over-sized arch are all that can be seen. The chief guard - there are only two - says he has little to do most of the time.
The road to Chapri is new, fast and tarmac - part of the government's effort to win the hearts of the truculent locals. It runs 80 miles from the regional centre of Kohat up the Kurram river valley.
The first major town on the way out of Kohat is Hangu. Last year it was the site of a bloody conflict between Sunni and Shia Muslims. The sectarian balance of the region was upset by an influx of Afghan refugees, almost all Sunni, after Russia's invasion.
Another consequence of the war was a flood of heavy weaponry into the region. Violence is frequent and when it does break out combatants deploy artillery, mortars and rocket launchers.
Bad Shah, a flour dealer in Hanju's main bazaar, said Shias and Sunnis live together like brothers, and like brothers they sometimes fight. "It doesn't mean we don't love each other," he said, though the families of those who died last year might disagree.
A few miles past Hangu is Doaba. Almost all the town's families have relatives working in the Gulf, particularly Dubai, who send back money. The influx of cash has doubled or trebled the area's income.
Sardullah Khan Bangash said much of his income came from his 35 relatives in Britain. Most were in Birmingham, he said, and he chattered happily about the West Midlands. The distance from Dudley to Doaba suddenly seemed less.
We were talking at a dastarbandi, or graduation ceremony, at Doaba's Islamic school. A huge tent had been set up in the courtyard and hundreds of students milled about. As we left there was a short burst of gunfire from the hills. In the tribal territories men are not men if they do not carry a gun that they have used in anger.
Modern, relatively moderate Pakistan is still a little rough round the edges.
Jason BurkeReuse content