Barnala now 20th District of the State of Punjab, was earlier known as ANAHADGARH and the history shows that it was established as a Town by Baba Alia Singh Found of Patiala State, who was born on 8th January 1691, in Village Phool (now in District Bathinda). In the year 1722 Baba Alia Singh captured Barnala Fort, which is popularly known as Qilla Mubarak from where in the year 1753, he laid the foundation of Patiala Town where in the year 1820, he shifted and made his Capital and is reported to have died on 22nd August 1765.
It is reported that the Judicial Courts at Barnala were shifted from Dhanaula in Qila Mubarak and were thus established about 140 years ago. From the record of this Court, it shows that on 9.8.1946, library of the Office of District and Sessions Judge, Barnala, came into existence. In the absence of any reliable evidence, it can be presumed that on this date, Court of District and Sessions Judge, Barnala, was in existence. It has been told that during those times, the Court of Senior Sub Judge (Civil Judge, Senior Division) was termed as “Naib Dewani” and the Court of Chief Judicial Magistrate was called as Naib Faujdan”, which were also in existence. The Courts at Barnala were under the jurisdiction of then Pepsu High Court at Patiala. It has been revealed that in the year 1956 with tie merger of Pepsu with Punjab, the district status of Barnala was abolished along with the post of District and Sessions Judge and thereafter, post of Additional District & Sessions Judge was created at Barnala, which is still continuing.
Barnala was a Sessions Division and on 01.11.1966, it was bind up and merged into Sangrur Sessions Division, However, Court of Addl.District and Sessions Judge was established Sh.Sukhdev Singh was, at that time working as Addl. District and Sessions Judge at Barnala on 01.11.1966. At present Judicial Courts of Barnala are housed in a newly constructed Judicial Court Complex on dated Sunday, 12th May, 2013. Before shifting to the newly Court Complex, the Judicial Courts of Barnala were housed in old building which was historical building. In a part of that building, Chulha (Hearth) of Baba Alia Singh are still there. This is a historical monument. The Judicial Courts of Barnala were shifted from old building situated in the centre of city Barnala to newly constructed Judicial Court Complex in the year 1985.A position of the old building of the Judicial Court Complex bas a historical importance. These monuments are still there and preserved with great care. This building was constructed as late as in princely state of Patiala.