The Sub-Continent remained under British Rule for 90 years (1858 to 1947) and the British Government introduced the civil service on the analogy of civil service of United Kingdom. The Indian Civil Service (initially known as Imperial Civil Service) was taken over the administrative control of Sub-Continent in 1858 for implementation of the policies of the Imperial Rule and service of general public. Initially, locals were not allowed to compete against the officer level posts; with the passage of time they were also allowed to compete for the Civil Service Exam.
Pakistan came into being on 14th August, 1947 and its own civil service was established from the available officers who opted for Pakistan, resulting in formation of Civil Service of Pakistan (CSP). It was re-framed and re-established in 1971 under "Chapter I: Part-XII, Article 240" of the Constitution of Pakistan which gave it foundation and constitutional status