Inhabited since the Hallstatt period, the populated area lies in the Tisza Valley, an important route as being the only access to the otherwise mountainous, sparsely populated region. After 895 in the 10th century the area became part of Kingdom of Hungary. The first mention of a settlement dates back to the 11th century, and the city as such was first mentioned in 1326. In 1352, it was a free royal town and the capital of Máramaros "comitatus", just outside Transylvania.