 In the 16th–17th centuries, areas populated by the Jasz people were under Ottoman administration, but at the end of the 17th century they were recaptured and returned to the Kingdom of Hungary, which was then part of the Habsburg Monarchy.Habsburg Emperor Leopold I sold the area to the Knights of the Teutonic Order.This saw the end of the privileged position of Jászberény.