Subotica probably first became a settlement of note when people poured into it from nearby villages destroyed during the Tatar invasions of 1241–42. However the settlement has surely been older. It has been established that people inhabited these territories even 3000 years ago. When "Zabadka"/"Zabatka" was first recorded in 1391, it was a tiny town in the medieval Kingdom of Hungary. Later, the city belonged to the Hunyadis, one of the most influential aristocratic families in the whole of Central Europe.