 In the autumn of 1847, with only two thousand troops, Lawrence engaged and defeated on two occasions large numbers of the hill men of the tribes on the Swat border.On the breaking out of the second Sikh War in 1848, Lawrence's great personal influence at Peshawar for some time kept his regiments faithful, but at last they went over to the enemy, and, on 25 October 1848 he was a prisoner in the hands of Chuttur Singh, but was three times permitted to leave his captivity on parole.With his wife and children, he was released on 22 February 1849, in the peace following the Battle of Gujrat, and received the thanks of both houses of parliament and of the governor-general for remaining at his post with such devotion.