Sir Robert Sale's force arrived at Jellalabad on 13th Nov 1842. Sale had been the commanding officer of the 13th Somersetshire Light Infantry since 1825 and he now had under his command the 700 men of the 13th, as well as 600 sepoys of the 35th Native Infantry, 130 sowars of the 5th Bengal Cavalry, 90 sowars of Shah Shujah's cavalry, 14 pieces of artillery, sappers and miners and some Afghan Jezailchis. He also had around 3,000 camp followers, 750 camels and 300 wounded or sick.
Jellalabad is about half way between Kabul and the Khyber Pass, the other end of which is Peshawar. The fort that they were defending was 550 yards south of the Kabul River which was fordable. The walls were in a derelict state and in need of urgent repair work, but it was first necessary to disperse the 6,000 tribesmen who were closing in on them. On the 14th November a sortie of around 700 men was sent out to attack Piper's Hill, some 300 yards south west of the fort. The small hill was so called because it was a focal point where the tribemen danced to the sound of a piped instrument called a saranai. In the fight the enemy lost about 200 men and the rest were dispersed.
Work now began on repairing the walls and excavating a ditch all the way around the outside of the walls, 10 feet deep and 12 feet wide. But on 27th Nov the tribesmen returned and another sortie was sent out under the leadership of Lieut-Col William Dennie who had been second-in-command of the 13th LI since 1832. He was successful in discouraging the tribemen, of whom 100 were killed. Building work could now re-commence and it was peaceful enough in the next 6 weeks for local people to bring supplies to the fort.
Somehow messages managed to be sent to the fort from Kabul and on the 9th Jan 1842 a letter came from Elphinstone, addressed to Macgregor, the Political Officer in Jellalabad, ordering the return of Sale's force to India. This was Elphinstone's way of showing goodwill, in an attempt to defuse the highly dangerous situation. Sale knew that a relieving force from India was held up in the Khyber Pass and assumed that that route was too difficult. He also knew that his wife was still in Kabul. There was disagreement amongst the commanders but Sale ruled that they stay put.
On 13th Jan some officers spotted a lone horesman approaching the fort. They waved to him and he replied by waving his cap. They rushed out of the Kabul Gate and found that it was Dr Brydon who had ridden 29 from Gandamuk. He reported that he was the sole survivor of an army of 16,000 men, although other accounts claim that it was 4,500 fighting men and 12,000 camp followers. The cavalry was sent along the road towards Bawali and found some mutilated bodies four miles out, and no sign of life. A large lantern was hung from the Kabul Gate and the bugles of the 13th were sounded every half-hour. By day the Colours of the regiment were displayed to attract any further survivors. Some more people did reach the fort; a sergeant-major of the 37th NI, a merchant called Banes and some Indians. Robert Sale heard that among the captives taken by the tribesmen was his wife.
Following the news of the massacre, all Afghans were expelled from the fort, including the Jezailchis, and camp followers were trained in the use of weapons. There was further discussion about evacuating and fighting their way back to India but Sale had now managed to make contact with the captives 35 miles away at Buddiabad, among whom was his wife. They received news that a relief force had failed to relieve the garrison at Ali Masjid but that General Pollock had arrived in Peshawar to organise his army of retribution. Sale sent word to Pollock to inform him of his situation. He had 2,236 fit for duty and 195 unfit. The 13th LI had 719 fit and 30 unfit. There were 70 days rations for British troops, half-rations for the Indians, and 25 days fodder. There were 1,000 native troops and 1,300 armed camp followers.
Akhbar Khan now headed towards the fort, collecting men, and by 15th Feb camped 10 miles west with about 2,000 fighters. But on the 19th Feb an earthquake struck the fort causing considerable damage to the defences and demolishing the Kabul gate. The tribesmen were also affected and many returned home to find out if their villages were still standing, so hostilities were suspended for a week. This gave Pollock extra time to organise his relief operation. On 26th Feb the fort was invested again and 2 weeks later reports came in that the enemy was attempting to mine the bastion at the north-west corner.
A sortie was sent out under Dennie on 11th March but no mining was discovered. Another sortie was made on the 24th March, and again on 1st April in which 500 sheep and goats were captured. Rumours started to spread that Pollock's advance had been checked in the Khyber Pass, also that a revolt had started in Kabul and that Akhbar Khan was going to return there. Sale thought this was the time to go on the offensive, so on 7th April three columns left the fort at dawn to march towards the enemy camp. An outpost fort stood in their way and Dennie's centre column, which was supposed to bypass it, actually lost its way and came up against it. The fort was strongly held and caused them trouble. Lieut-Colonel Dennie was killed in the fight, and Sale managed to send artillery to help capture the fort. The left column had to form a square to repel cavalry, while the right column turned the enemy flank on the Kabul river. By 7am the Afghans were in retreat. Their guns were captured and their camp destroyed. The British losses were 14 killed and 66 wounded. The 13th lost Dennie and 8 men killed, 2 officers and 31 men wounded.
The successful troops returned to the fort and normal garrison life could be established. Local chiefs made submission and plentiful supplies were brought in by the local people. News came through on the 9th April that Pollock had managed to get through the Khyber Pass and on the 16th his army marched into Jellalabad, greeted by the band of the 13th playing the Scottish tune 'Oh, but ye've been a lang a'coming.'