On 16 July 1627, the islands were captured by a group of North African pirates who stayed there until 19 July. They were under control of the Ottomans. The pirates captured 234 people from the islands and took them on a 27-day voyage to Algiers, where most of them spent their life under bondage. One of the prisoners, minister Ólafur Egilsson, returned in 1628 to the islands and wrote a book about his experience. In 1636, a ransom was paid for 34 of the captives, and most of them returned to Iceland. After this, a fort was built on the Helgafell volcano to keep watch for ships.