The early history of the area comprising the present Loralai District is shrouded in obscurity and can only be surmised from the general history of Balochistan. About 1383 AD, the Maliks of the Kurat Dynasty who swayed the scepter in Kandahar, succumbed to Amir Timur, and Kandahar together with other areas constituting the old Ghaznavid Kingdom fell into the hands of the latter. These territories which were conferred by Timur on his grandson Pir Muhammad, and which are mentioned as extending to the frontiers of Sindh, would presumably have included the Loralai District. Babar, after conquering Kabul, made a move towards India and on his return via Sakhi Sarwar passed through Balochistan. The province remained under the Mughals until 1559 AD, when it passed into the hands of the Safavid kings of Persia under whose reign it remained until 1595 AD. It was than again acquired by Emperor Akbar. Under Akbar’s regime, the territory of Duki which was generally garrisoned, formed one of the dependencies of Kandahar province and provided a contingent of 500 horses and 1000 foot soldiers, besides other contributions. In 1622 AD, Kandahar again passed to the Safavids when Shah Abbas conferred the Government of Pishin and its tribal dependencies, which probably also included Duki, upon Sher Khan Tarin.
Later Emperor Shah Jahan made great efforts to regain the province of Kandahar from the Safavids and with this end in view, in 1655 AD, sent a large expedition consisting of over 104,000 men under his elder son prince Dara Shikoh. After a lengthy investment, Dara Shikoh had to abandon the siege of Kandahar and returned. This was the last attempt on the part of Mughals to regain Kandahar which was now lost to them for ever. The province continued to be under the rule of the Safavids, but the Afghan inhabitants had become so highly discontended owing to the persecutions by the Persian governors that there was an uprising under Mir Wais Ghilzai, who established the Ghilzai power in Kandahar in about 1709 AD After ruling about 30 years, the Ghilzai power gave way to Nadir Shah who in 1737 AD marched on Kandahar and after a severe struggle, Mir Husain Khan, the last of the Ghilzai rulers, submitted. In 1747 AD, Naidr Shah was assassinated and the Afghans with a view to organize a regular government of their own, selected Ahmed Shah Durrani, a ruler of Kandahar, towards the end of the same year. Ahmed Shah at first attempted to administer the valley as a Kandahar District and appointed a governor named Agha Jan to represent him. This man irritated the Tarin tribe considerably and they murdered him. Ahmed Shah indignant at this act marched on Thal with a strong force. The Tarins surrendered to him. An annual tax of Rs.3,104 (Kaldar) was levied on the Tarin cultivators living on the Thal and Anambar perennial streams.
The Durranis were followed in about 1826 AD, by the Barakzais under the first Amir of Afghanistan, Dost Muhammad, and almost the entire district came under the nominal rule of this dynasty. According to the Treaty of Gandamak, signed on the 25th May 1879 AD Duki and Thal Chotiali land with other parts of Balochistan passed into the hands of the British.
The steps by which the different parts of the district came under British control have been gradual. With the increase of British influence, most of the tribes petitioned to be taken under British protection and expressed their willingness to pay revenue. By 1884 AD, the British administration in the form of an Agency was established. During the early eighties some murderous attacks were made upon British subjects by different clans of Kakars under the influence of Shah Jahan of Zhob. Accordingly British troops were moved into Zhob and Sir Robert Sandeman held a darbar at Bori. The chiefs of the Bori valley attended this meeting and surrendered after the defeat of Shah Jehan. On the 22nd November 1894 AD, the Bori and Zhob chiefs reached an agreement accepting the supremacy of the British Government and promised to put a stop to further raids and to pay a fine of R.20,000. Gradually, administrative control was strengthened. On the 1st November 1887 AD, the district was declared a part of British India. In 1947, prior to the creation of Pakistan, a referendum was held by the British in which the tribesmen of Loralai district, like other districts of the Frontier Region, opted for Pakistan.