I’m not sure what border control was like at the pass, so I’ll leave that for someone else…
It was held because it was THE key strategic point in the region. Although there are other high passes through the Hindu Kush, the Khyber and Bolan Pass were really the only good transition point for an army at the time.
The rump of Afghanistan ( relative to its short-lived height under its founder ) was allowed to retain a nominal independence because it was too damn much trouble to hold for very little return and as the Great Game developed it had its uses as a strategic buffer between the British and Russian colonial empires.
I don’t think there were any border controls as such - the British garrison at the Pass was there to keep out invading/raiding Afghans and suppress local banditry, not to conduct customs inspections. Unless you were waving a rifle in the air while shouting “Death to the Unbelievers!” I doubt they cared who or what you brought in.
British government on the North-West Frontier consisted mostly of leaving the local Pashtun tribal leaders in charge subject to them not getting too far out of line (c.f. the “Tribal Areas” in present-day Pakistan). If a leader did get out of line, the British sent an expeditionary force, threw him out, installed a more pliable leader and went away again - they didn’t try to administer the area directly.
[nitpick] As ** merrick **has said, North West FrontierProvince. [/nitpick]
As it was difficult to conquer it was not directly administered by the British, but held responsible for attacks on the administered areas, and subject to punitive raids. According to wiki there was direct governance by the British from 1931 until independence in 1947.
If you cross the Khyber pass or are anyway in the Khyber Pass itself you are already in British Territory. The Khyber Pass leads to Landi Kotal which leads to Afghanistan.
The North West Frontier Province and the “Tribal Areas” are different concepts and to this day different entities. All along what is now Pakistan, the British had what were known as “Tribal Areas” or more properly <insert tribe name> Agency. There were several between the British Province of the Punjab and the Afghan border (there still are some within the Punjab itself).
The border was finalised in 1893, the British actually gave up territory especially around Jalalabad and Balkh. The border was designed with the general concept, the heights are to be British as are both banks of any river.
After the treaty was signed the parts of the province of Punjab were split into a new province called the North West Frontier Province and that was like anyother province of British India. It continued as the same until the year 2010 when it was renamed (quite controversially) as Khyber Pakhtunkhwa.
There was no visa control at the border as such, Afghans have ben migrating east for millenia and that continued, my own family moved to British India sometime before the First World War.
The Tribal Areas were ruled by something called the Frontier Crimes Regulations. (FCR). The British Representative was the “Political Agent” and the tribes representative was the “Malik”. The two were together responsible for maintaining peace. The Maliks was responsible for his tribes good behaviour, if some one committed some crime or caused any such disturbance, the Political Agent would investigate and tell the Malik who was responsible. The Malik would then take action under whatever tribal law that was applicable, if he failed to do so, the Political Agent could and would take action against the whole tribe.
This process continued until 1947, when the Government of Pakistan announced plans to abandone it, but the decision was changed before it could be implemneted. The system remained till 1990, when it was (stupidly) in my opinion abandoned.