The name of the settlement appeared first in 1009 as "Kapos", in Saint Stephen's memorandum of association, which fixed the borders of the Roman Catholic Diocese of Pécs. In 1061, Atha (Ottó), the lord lieutenant of Somogy founded a benedictine monastery, in which consecration King Salamon and Prince Géza took part. King Béla IV, after the Mongol invasion of Hungary, built strong castles. Kaposvár's first castle was built during his reign in the years of 1200. Despite this, the monastery and considerable settlement around the castle didn't come into existence yet, one reason being because the settlement was avoided by the commercial roads and on the other hand because the different clans fight didn't favour the development. The rectangular motte castle was reconstructed as a stone castle in the 15th century.