A fort could provide shelter to the king and his armies against enemies and check the invaders from advancing further into the kingdom. Protected by fortifications, a king or commander could engage the enemy with greater confidence and had a chance of repulsing him.