First siege of Anandpur
The first siege of Anandpur was a thirty-five-day-long siege at Anandpur led by the Rajas of the Sivalik Hills and the Gujar and Ranghar tribesmen against the armies of the Sikh under Guru Gobind Singh. Prelude

The hill Rajas were concerned about Guru Gobind Singh's rising power and influence in their region. The Mughal generals had failed to subdue the Guru in the Battle of Anandpur (1700). The Rajas appealed to Mughal emperor Aurangzeb to aid them. Raja Bhup Chand of Hundar opposed seeking the aid of the emperor. He insisted the Rajas should be able to win themselves. The Rajas of hill states, Jammu, Nurpur, Mandi, Bhutan, Kullu, Kionthal, Guler, Chamba, Srinagar, Dadhwal, Hindur, Jaswan, Bilaspur, Kangra, Bijarwal, Darauli, and Sirmur, met in council under Ajmer Chand. Ajmer Chand convinced the council to follow him. Ajmer Chand recruited the Gujjars and Ranghars, both of whom had previous hostilities with the Gurus. They were led by Jagatullah. Ammunition was distributed amongst the Rajas, and they began to march at night. They sent a letter to the Guru, asking him to pay the arrears of rent for Anandpur (which lay in Ajmer Chand's territory) or leave the city. The Guru insisted that the land was bought by his father and was his property. Duni Chand led five hundred men from Majha region to assist the Guru. Reinforcements from other areas also arrived to help the Guru. Siege

Day one 
The Rajas and their allies besieged Anandpur. The Sikhs had taken positions in the forts at Holgarh (Agamgarh), Fatehgarh, Taragarh, Keshgarh, and Lohgarh. The Guru ordered them to stay on the defensive. Sher Singh and Nahar Singh, with 500 soldiers each, guarded Lohgarh while Bhai Udai Singh with the men of Duni Chand took Fatehgarh. Ajit Singh with 100 soldiers guarded Taragarh. Raja Ajmer Chand with others launched an attack on Taragarh first where Ajit Singh was stationed. A fierce battle ensued. Many Sikhs were killed, and Raja Ghumand Chand of Kangra was wounded. The Sikh managed to hold off the Mughals. Later the first day, the rajas fired cannons on the Guru's forts. Raja Kesari Chand of Jaswan with his troops, the Gujars and the Ranghars attacked Lohgarh and the outposts of Udai Singh. The attacking force was 100,000. Arrows and bullets rained down, and the attacking army had lost half of its strength. The Gujars and Ranghars were on the verge of retreat, but Jagatullah managed to rally his men and they launched a fierce counterattack. Seeing this, Ajit Singh with his troops numbering 100, joined Udai Singh. Kesari Chand and Jagatullah's troops were forced to retreat. Following defeats on the first day, the Rajas held a council. The Rajas had planned to launch a three-sided attack. Kesari Chand would attack from the right flank and Jagatullah would attack from the left flank. Ajmer Chand would attack from the front. The Rajas and allies began to execute the plan. Kesari Chand began his attack first. Kesari Chand had under his command an army of 100,000. The army face the Sikhs who were led by Ajit Singh and Udai Singh. Sahib Singh headed to Agamgarh, also known as Holgarh, where Jagutullah with a large army was attacking. Soon after, Jagatullah would be shot in the head by Sahib Singh and died. A Nishan Sahib was planted near the body. Ghumand Chand led the alliance troops to attack the location of Jagatullah's body. Bhai Maan Singh defended. A great massacre ensued as Sikhs defended their position. For 9 hours, Ghumand Chand and his allied forces fought before falling back for rest, and the Sikh captured the body of Jagatullah. After this victory Guru Gobind Singh gave a farla to Bhai Dharam Singh, Bhai Alam Singh, and Bhai Maan Singh. He also gave rewards to other Sikh who fought. The Rajas again held a council at night, in which Ajmer Chand proposed reconciliation with the Guru. Many Rajas agreed, but Raja Kesari Chand of Jaswal and Raja Bhup Chand opposed the proposal, and suggested a more determined fight the next day, to oust the Guru from Anandpur. Day two 
In the early morning of day two, the Sikhs fired cannons and musket at the camps of the Rajas which forced them to move back. Next day, Ajmer Chand launched a fierce attack on Fatehgarh with a do-or-die mentality. Fatehghar was still in construction with one of its walls only being half made. Bhagwan SIngh was one of the commanders of the fort. A five-hour battle ensued where many soldiers on both sides died. Bhagwan Singh died in this battle. Other attacks ensued all throughout the day. Ajit Singh launched a counterattack in the afternoon. More than 500 Sikhs joined this counterattack. Ajit Singh's horse was killed, but he continued to fight. The troops of the alliance began to retreat, but Raja Kesari Chand managed to rally his troops and they stood their ground. Following this, the alliance of the Rajas, Gujars, and Ranghars decided to wait out the Sikh. Day three 
Fighting resumed as early as dawn in certain places. Ajmer Chand, after the previous day's success, attacked Anandpur. The attack lasted all day and spilled into the next day. This attack was a disaster for Ajmer Chand, but Sikh veteran generals such as Bagh Singh and Gharbar Singh fell in the battle. The Sikhs did an attack at night with only swords which killed many of the Rajas. Ajmer Chand decided to call another council of the Rajas. The Raja of Mandi insisted on peace, but his requests were dismissed. It was decided that the Rajas should put their focus on capturing Lohgarh. Siege continued 

The Rajas had decided to starve out the Sikhs, but were tired of waiting and planned to execute their elephant plan. Duni Chand hearing rumors an elephant would attack and hearing Guru Gobind Singh comment that Duni Chand is the elephant of the Sikh army grew wary. At night, Duni Chand and his troops ran away and deserted the Guru. Duni Chand and his troops decided to go to Dhir Mal. The next day, the army commanded by Ajmer Chand positioned themselves outside of Lohgarh. The Rajas had planned to send one intoxicated Prasadi elephant to Lohgarh in hopes it would break the gates of the fort. The entirety of the war elephant except its tip was covered in steel. The elephant was hit, and it went into a rageful fury to Lohgarh. Behind the elephant charged the army of the Hill Rajas. Guru Gobind Singh asked Bhai Bachitar Singh to become his elephant to which he agreed. He was given a nagini barcha (cobra lance) and took the Gurus blessings. Bachitarr Singh was ready to face the drunken elephant. Next Udai Singh took the blessings of the Guru and was given a sword to kill Kesari Chand. Udai Singh charged and slaughtered his way through the soldiers to get to his target. The elephant had made its way to the gates of the fort. It had killed many Sikhs. Bachittar Singh opened the gates of the fort. He raised his lance and pierced the elephant through the armor, wounding it. The elephant turned around and killed many soldiers of the Hill Rajas and was unstoppable. As this happened, Udai Singh met Kesari Chand. He shouted, "Kesari Chand come and hit". Kesari Chand hit but missed. Udai Singh chopped Chand's head off. He put the head on a spear and raised it up high as he made his way back to the gates of the fort. Mokham Singh soon after finished the elephant off. Bhai Sahib Singh injured the Raja of Handur and the army of the Raja's retreated. Last attack 
The Hill Rajas once again held a council and peace was considered, but was not taken. On the following day, the troops of Raja Ghumand Chand of Kangra attacked Anandpur. A bloody battle happened. Ghumand Chand's horse was shot by Alam Singh. A melee happened around the Raja. His men managed to keep the Sikh at bay temporarily. The battle lasted till evening, with varying results and resulted in the death of Ghumand Chand at the hands of Bhai Himmat Singh. Final days of the siege 
Guru Gobind Singh was hesitant to accept the Rajas demands, but the Sikhs insisted on it. After meeting Sikh commanders who proposed leaving, Guru Gobind Singh and the Sikhs left Anandpur. Aftermath

The Guru left for Nirmoh village (Nirmohgarh). The deal turned out to truly be a plan to attack the Sikhs and the Guru while they were weak. The Rajas attacked, and the Sikh fought the Battle of Nirmohgarh (1702). 