In the 13th century, while still under the reign of the Vovberk dynasty, Celje started to flourish again. In the next two centuries, it had a key role for the entire Central Europe. The credit goes to the Lords of Žovnek (Sanneck) of Savinjska Valley who inherited the estates from the Counts of Vovberk, extinct in 1322. The transfer of the estates to the House of Žovnek was a watershed for Celje's development. This was seen especially after 1341 when the German Emperor Louis IV, the Bavarian, elevated the Žovneks to the ranks of Counts; thereafter, they are known as the Counts of Celje. In their short reign, the ambitious and successful dynasty left a permanent mark. Trough cunning politics and calculated marriages, they accumulated wealth and power. Their ascent was meteoric. The estates they amassed in Slovenian, Croatian, or Hungarian lands granted them the titles of Princes of Zagorje (1397), Bans of Croatia, Slavonia, and Dalmatia (1407); Barons of Hungary (1430), and finally in 1437, the Princes of the Holy Roman Empire. Their daughters married offspring of major ruling dynasties in Central Europe and the Balkans, such as Kotromanić of Bosnia, Piast and Jagellon of Poland, and Branković of Serbia. The most notorious, maligned, yet also the most admired nobles of her time, Barbara Celjska (Barbara of Celje), daughter of Count Hermann II, however, married the Holy Roman Emperor and the King of Hungary and Bohemia, Sigismund of Luxemburg.
In the late period of the Counts of Celje, during the reign of Friderik II and Ulrik, their power was also made felt in the battlefield, especially against the formidable Habsburg dynasty. Although the Counts of Celje were their equals in terms of rank, the Habsburgs would not acknowledge such equality. After the death of Sigismund of Luxemburg, protector of the Celje family, Frederick III of Habsburg sought to deal with his ambitious adversaries. The Habsburg – Celje war broke out in 1443, which ended rather woefully for the Habsburgs. The Counts of Celje remained imperial princes and they signed an agreement of mutual inheritance which played a very important part when the male line of the Counts of Celje died out.
Ulrik's foray to Hungary was not as successful for the House of Celje. As they fought for the coveted Hungarian crown, Celje nobles made many an enemy, especially among the Hungarian magnates who launched a major conspiracy against Ulrik. In 1456, when crusader armies defended Belgrade from the Turkish siege, the Hunyadis of Hungary, the main rivals of the Counts of Celje, assassinated Ulrik of Celje. Without an heir, their meteoric rise was over and a gut-wrenching cry echoed in Celje during the funeral of the last Count of Celje: "Counts of Celje, today and never again." The three yellow stars on blue background thus became but a memory of the times when Celje saw its heyday – when the small town on the Savinja River was not merely a part of Central Europe – the mediaeval Central Europe was co-shaped by it.