Wels is the second largest city of the state of Upper Austria, located in the north of Austria, upon the Traun River near Linz. The area of Wels has been settled since the Neolithic era (between 3500 and 1700 B.C.E.), as evidenced by archaeological finds of simple tools, especially from around the banks of the Traun River in what is now the city center. Wels served as a minor trading centre during the Middle Ages. In 1222, during the rule of the Babenberger family, Wels again received city rights. A document dating to 1328 provides evidence for Wels' important role as the location of a market. Its endowment with economic privileges, and its advantageous position on several rivers allowed it to gain an important position in the region.