Original: He was driven out by Sher Shah Suri, during whose rule nearly all the villages of this ilawa were located.
Simplified: He, however, agreed to abide by it.