Once the country was secure, there was time to rebuild the wooden forts in stone. The result was a tower-house (donjon, in French) built on the mound (called a motte). The tower-house is known in English as a keep. The keep had no entrance at ground level. The entrance was on the first floor, reached by an outside staircase. The ground floor was used to store food and drink.
Many centuries later, when castle keeps were less used, the lowest part of the keep was often used as a prison and its name became corrupted to 'dungeon'.