At least 29 people were killed and more than 50 others injured in a battle at a prison holding Islamic State militants in Afghanistan, after a deadly attack by gunmen. In addition, the authorities said 10 insurgents were killed. Some prisoners escaped, although a number were recaptured.