Mir Khalifa was one of the closet companions of Babur. In 1526 Babur established Mughal Empire after defeating Ibrahim Lodhi in the Battle of Panipat. Emperor Babur created the ministry of "Vakalat" (Emperor's representative) and made Mir Khalifa the first Vakil of the Mughal Empire.