Founded in circa 1680, historians call it the mosque of Khwaja Ambar, stating that Ambar was the "head eunuch" of subahdar Nawab Shaista Khan.