Goes was founded in the 10th century on the edge of a creek: de Korte Gos (the Short Gos). The village grew fast, and in the early 12th century it had a market square and a church devoted to Mary Magdalene. In 1405 Goes received city rights from William, Duke of Bavaria, by his right as count of Holland, and in 1417 it was allowed to build town walls. The prosperity of the city was based upon the cloth industry and the production of salt. In the 16th century Goes declined. Its connection to the sea silted up and in 1554 a large fire destroyed part of the city.