After prolonged efforts by Sikhs, starting with Guru Gobind Singh, then Banda Bahadur,Nawab Kapur singh, Jassa Singh Ahluwalia,Jassa Singh Ramgarhia, and other Sikh warriors, finally Ranjit Singh was able to consolidate the gains made by earlier sardars. He defeated the expansionist son of Abdali, named Zaman Shah in a battle between Lahore and Amritsar. Now it was time for Ranjit singh to declare himself the Maharaja of Punjab and treats all his subjects Hindus, Muslims, Sikhs equally. On April 12 1801, Ranjit Singh declared himself Maharaja of Punjab on the same auspicious day of Baisakhi when Khalsa was made by Guru Gobind Singh. The investiture ceremony was performed by Sahib Singh Bedi, who was the direct descendant of Guru Nanak. A commemorative coin was issued, Nanakshahi rupee as it was called. People showered flowers on him and in turn Ranjit singh showered gold and silver coins on his subjects. It was a grand gala occasion. Ranjit Singh rode on the elephant and passed through the streets of Lahore. He won popular acclaim and earned a lasting place in the hearts of the people. At night the town was illuminated with oil lamps and there was display of fire works. Many chiefs and sardars offered nazrana and in return receive khillats. The fort was garrisoned. The city which had suffered 30 years of Bhangi misrule needed peace and rule of law. The Maharaja ordered that no interference be made with the personal and public law of Muslims. They were given equal rights with other subjects. Courts presided over by the Qazis and Muftis were confirmed. Prominent citizens were designated as chaudhries and mohallas. The sense of security was given to the people. Trade and Business were established on a sound basis.
The maharaja established a secular state in which all the subjects, Hindus, Muslims and Sikhs were treated alike. Many talented Hindus and Muslims joined his service and the Maharaja gladly participated in the religious festivals of all the communities. Festivals like Dussehra, Diwali, Holi, Basant were celebrated with splendor and gaiety. The Maharaja participated in them along with his subjects and on the occasions of Amavas and Baisakhi took a dip into the holy tank at Amritsar. By his secular outlook, the Maharaja earned great respect from his subjects and also their loyalty.
Slowly Ranjit Singh started consolidating the other parts of Punjab. He occupied Amritsar in 1802 without any battle. Jathedar of Akal Takht, Akali Phula Singh was more then happy to serve Ranjit Singh, then about 12 or so families who controlled Amritsar. Ranjit Singh took Amritsar from them and Jagirs and lands in other places. This act increased his stature among Sikhs and Nihangs and Akalis were more then happy to serve under him in other battles. He created another regiment for them. Ranjit Singh slowly consolidated, Kasur, Multan, and several parts of Punjab which were ruled by Afghanis and Mughals. He took Kashmir and Naushera in 1816. in 1824 whole of North West province of Afghanis was under his control. He made friends with Dost Mohammad Khan and rescued him from a certain death, in return wife of Dost Mohammad Khan gave him Kohinoor Diamond, the largest know diamond in world (now it is part of UK's Queen's treasurey.
Many Indians from the force of East India company started joining the ranks of his government. As many sardars of the Bhangi famiy and other Sikh Sardars had joined the Maharaja army, they were required to furnish well-ewuipped soldiers at times of war. The total fighting force which could be utilised on any occasion was 31,000. Ranjit Singh appointed Misar Chajju Mal as the collector of Customs at Amritsar. The Misar was extremely loyal to Maharaja and rendered him useful service. Ranjit singh took keen interest in the management of the holy shrine. He appointed Surat Singh as its Manager. He gave shrine its marble face and its golden look from which the name Golden Temple or Swarn Mandir is derived. Marble and fresco paintings were also added. The eastern loggia of the shrine was gilded by Rani Sada kaur at a cost of Rs. 1,75,300 . Amritsr's gaiety and splendour increased. It was inhibited by aristocracy and many high dignitaries often visited the town. It was illuminated on special occasins. There were rejoicings in the city and it gave a festive appearance and whenever the Maharaja was victorious in any campaign, large scale celebrations were held.
Two Europeans, Ventura, an Italian by birth, and Allard, a Frenchman, came to Lahore in 1822 to seek service in the Sikh army. Both of them had served under Napolean in the imperial army of France. After Napolean's defeat at Waterloo they lost their occupation and left Europe to try their fortune in the East. They had heard many a tale of the grandeuf of Ranjit Singh's court and were taken up with the idea of visiting Lahore. Ranjit Singh, although not educated but was very wise and intelligent, he knew about the exploits of Napolean. Many historians of that time had compared them. Ranjit singh was even called Napolean of the East. Ranjit singh met these two European and he received them kindly asked them about their health and journey, previous employment, future plans. He showed them his troops on parade and provided amenities for their entertainment. In April of 1822, they sent a letter to Maharaja asking for an employment with his troops. The communication between these soldiers and Maharaja was in French through the trusted aide Faqir Nur-ud-din, who knew French, English, persian as many other languages. Maharaja wanted to make sure that these people did not had any contacts with British and only when he was cent percent sure, he gave them command of 500 horsemen each. This command had few Purbias and other Hindus of Central provinces, employed with Ranjit Singh. They were also to train all forces of Sikhs in the western method of drill. Ventura's army was called Fauj-e-Khas while little bit later Allard was asked to raise a cavalry of fresh recruits.
Then Ranjit Singh also made them sign an agreement that in the event of a clash between Maharaja and European power, they would remain loyal to Sarkar Khalsa and fight for him. They were to wear their beards long and abstain from beef and tobacco. Ranjit Singh provided houses for Ventura and Allard and gave them handsome salaries. To Ventura he gave 40,000 rupees when he married a Muslim girl from Ludhiana. Two villages were subsequently given to the daughter of Ventura as jagir. Ventura built a house, which still exists near Anarkali, it is a beautiful Cheateau in French style. This shows that even though Ranjit Singh was cautious but shrewd and able enough to distinguish between people beneficial to him.
Sarkar Khalsa ruled Punjab for fifty years. Ranjit Singh's biggest oversight was that he did not raised his successor. His son Kharak Singh was an opium and wine addict and he let his Dogra Prime minister ruled Punjab after death of Ranjit Singh in 1839 A.D. Kharak Singh the new Maharaja was treachoriously killed by Dogras and his son Nau Nihal Singh also died two days later. Ranjit Singh's second son, Sher Singh was killed by two Sikh sardars employed by Dogras. Punjab was devoid of any leadership. Khalsa army was ruled by panchayat and was totally independent of state affairs which was under Dogras. Dogras appointed Lal Singh and Tej Singh as generals of Army. Khalsa army was defeated by British is a series of wars called Anglo-Sikh wars I and Anglo-Sikh wars II . In 1849, Sarkar Khalsa ceased to exist and its 9 year old youngest son of Ranjit Singh named Dilip Singh was send to England where he converted to Christianity and married into royalty. But when he was 50 years old he realized his mistakes of childhood(conversion to Christianity) and took Khanda da Pahul and became a Sikh again. He tried to enter Punjab but British successfully resisted his efforts. He even talked to Russia for invasion of Punjab so that he can get his kingdom back, but he died in a hotel of Paris when he was 60+ years old, in early 1900's.