time, the papacy had changed, and the Pope was now Pope Gregory IX; he would cause both peoples to be distinguished from Christians by means of badges; and would forbid both Jews and Saracens to buy or to keep Christian slaves. The year 1240 was the closing one of the fifth millennium of the Jewish era. At that time the Jews were expecting the advent of their Messiah. The Mongol invasion in 1241 seemed to conform to expectation, as Jewish imagination expected the happy Messianic period to be ushered in by the war of Gog and Magog. Béla IV (1235–1270) appointed a Jewish man named Henul to the office of court chamberlain (Teka had filled this office under Andrew II); and Wölfel and his sons Altmann and Nickel held the castle at Komárom with its domains in pawn. Béla also entrusted the Jews with the mint; and Hebrew coins of this period are still found in Hungary. In 1251 a privilegium was granted by Béla to his Jewish subjects which was essentially the same as that granted by Duke Frederick II the Quarrelsome to the Austrian Jews in 1244, but which Béla modified to suit the conditions of Hungary. This privilegium remained in force down to the Battle of Mohács (1526). At the Synod of Buda (1279), held in the reign of King Ladislaus IV of Hungary (1272–1290), it was decreed, in the presence of the papal ambassador Philip of Fermo, that every Jew appearing in public should wear on the left side of his upper garment a piece of red cloth; that any Christian transacting business with a Jew not so marked, or living in a house or on land together with any Jew, should be refused admittance to the Church services; and that a Christian entrusting any office to a Jew should be excommunicated. Andrew III (1291–1301), the last king of the Árpád dynasty, declared, in the privilegium granted by him to the community of Posonium (Bratislava), that the Jews in that city should enjoy all the liberties of citizens. Expulsion, recall and persecution (1349–1526) Under the foreign kings who occupied the throne of Hungary on the extinction of the house of Arpad, the Hungarian Jews suffered many persecutions. During the time of the Black Death (1349), they were expelled from the country. Although the Jews were immediately readmitted, they were again persecuted, and were once again expelled