In 1361, Louis I of Hungary granted the citizens of Debrecen the right to choose the town’s judge and council. This provided some opportunities for self-government for the town. By the early 16th century, Debrecen was an important market town.
King Sigismund, Holy Roman Emperor, as part of a treaty with Serbian ruler Stefan Lazarević, gave him the opportunity to rule Debrecen in September 1411.
A year after Lazarević’s death in 1426, his role was taken over by his successor, Đurađ Branković. Between 1450 and 1507, it was a domain of the Hunyadi family.
During the Ottoman period, being close to the border and having no castle or city walls, Debrecen often found itself in difficult situations and the town was saved only by the diplomatic skills of its leaders.
In 1693, Leopold I, Holy Roman Emperor elevated Debrecen to free royal town status. In 1715, the Roman Catholic Church returned to Debrecen, and the town gave them a place to build a church, so the Piarist monks could build the St. Ann’s Cathedral. By this time the town was an important cultural, commercial and agricultural centre, and many future scholars and poets attended its Protestant College.
In 1849, Debrecen was the capital of Hungary for a short time when the Hungarian revolutionary government fled there from Pest-Buda (modern-day Budapest).
After the war, Debrecen slowly began to prosper again. In 1857, the railway line between Budapest and Debrecen was completed, and Debrecen soon became a railway junction. New schools, hospitals, churches, factories, and mills were built, banks and insurance companies settled in the city. The appearance of the city began to change too: with new, taller buildings, parks and villas, it no longer resembled a provincial town and began to look like a modern city. In 1884, Debrecen became the first Hungarian city to have a steam tramway.
After World War I, Hungary lost a considerable portion of its eastern territory to Romania, and Debrecen once again became situated close to the border of the country. It was occupied by the Romanian army for a short time in 1919.
Tourism provided a way for the city to begin to prosper again. Many buildings (among them an indoor swimming pool and Hungary’s first stadium) were built in the central park, the Nagyerdő (“Big Forest”), providing recreational facilities. The building of the university was completed. Hortobágy, a large pasture owned by the city, became a tourist attraction.