The Afghan guns gradually came into action and a three-hour artillery duel ensued at an opening range of about 1700 yards , during which the British captured smoothbore guns on the left expended their ammunition and withdrew to replenish it.