The earliest written mention of the town was in the 12th century when Saxo Grammaticus in Gesta Danorum referred to it as ''Portus Mercatorum'', meaning Merchants' Harbour or, in the Danish of the time, ''Købmannahavn''. Traditionally, Copenhagen's founding has been dated to Bishop Absalon's construction of a modest fortress on the little island of Slotsholmen in 1167 where Christiansborg Palace stands today. The construction of the fortress was in response to attacks by Wendish pirates who plagued the coastline during the 12th century. Defensive ramparts and moats were completed and by 1177 St. Clemens Church had been built. Attacks by the Wends continued, and after the original fortress was eventually destroyed by the marauders, islanders replaced it with Copenhagen Castle.