During the Persian Campaign, the Ottomans were attacked in Khanaqin on 3 June 1916 by Russian forces led by Nikolai Baratov but managed to push back the Russian cavalry. While the Ottomans lost about 300 men, the Russian casualties were greater. However, the Russians succeeded in capturing the town in April 1917 due to Ottoman weakness and collapse of the Iranian government. Russia received support from the Kurdish tribes and allowed them to govern the area. Nonetheless, the Russian forces had to withdraw from the area in June 1917 due to the Russian Revolution which allowed the Ottomans to retake the town. The United Kingdom captured the city in December 1917 during their Mesopotamian campaign. After the capture, Britain approached the regional Kurdish tribes including Bajalan leader Mustafa Pasha Bajalan to consolidate their control. Khanaqin District was established in 1921.