Aurangzeb then marched onwards to Agra which he besieged, however not until he closed down the city's water supply did his father Shah Jahan finally surrender. Shah Jahan was soon imprisoned in the Agra Fort. Later Khalilullah Khan swore an oath of allegiance to Aurangzeb as a Mansabdar.