Before 1958 every telephone exchange had a human operator. If you wanted to phone a telephone connected to another exchange it had to be manually done by the operator.
In 1958 Subscriber Trunk dialling or STD was introduced by the General Post Office at Bristol. To allow the system to work each area had to be allocated a STD or dialling code. The introduction of the system cost 35 million and was completed in 1976 when the last human operated exchange closed at Portree in the Isles of Skye.