Kafka died before finishing the work, but suggested it would end with K. dying in the village, the castle notifying him on his death bed that his "legal claim to live in the village was not valid, yet, taking certain auxiliary circumstances into account, he was permitted to live and work there."