Meanwhile, the Western Afghan confederates were being gradually swallowed up by Rana Sanga in the guise of alliance and protection.[citation needed] This was increasingly posing a major threat to Babur.[citation needed] He was justly alarmed at the progress of Rana Sanga who was in active correspondence with Hasan Khan Mewati of Mewat, the chief of the Western Afghan confederacy, and had acknowledged as Mahmud Lodi as the Sultan of Delhi, the brother of the late Sultan Ibrahim Lodi whom the Western Afghans had proclaimed King after his brother's death.[citation needed] This would ultimately result in the confrontation known as the Battle of Khanwa.[citation needed]