Unity, of a kind, was restored. Lokietek was forced into exile. His quest for support took him as far as Rome, where he won the backing of Pope Boniface VIII, hostile to the Pfemyslids. Vaclav’s last serious opponent, Henry, duke of Glogow/Glogau (1273-1309), nephew of Henry Probus, recognized his suzerainty in 1303. Much of Poland, however, remained under the rule of territorial dukes. Vaclav’s direct authority covered mainly Krakow-Sandomierz, Wielkopolska and eastern Pomerania. He left an enduring administrative legacy in the office of starosta (literally ‘elder’). Its holders acted as viceroys in and administrators of royal estates, although his preference for Czechs in this role provoked growing resentment. To Vaclav, of course, the Polish lands were simply a subordinate part of a greater Pfemyslid monarchy. Polish reunification for its own sake was of little interest to him.
In January 1301, King Andrew III of Hungary died, leaving no male heirs. Vaclav found the temptation irresistible. His attempts to impose his 11 -year-old son, another Vaclav, on Hungary and, in the process, massively expand Pfemyslid power, were too much for the Hungarians, the papacy, Albrecht of Habsburg and the rulers of south Germany. By 1304 a Hungarian-German coalition had been formed. To gain the support of the margraves of Brandenburg, Vaclav promised to hand over to them eastern Pomerania and the port city of Gdansk. His supporters in Wielkopolska, already seething at the harsh rule of Czech stamstowie, could not accept this. Earh in 1305, revolt shook the southern part of the province. Those not reconciled to Czech rule would have preferred to turn to Henry, duke of Glogow. Vaclav’s Hungarian and German enemies declared for his exiled rival, Lokietek. Hungarian forces supporting Charles Robert of Anjou’s bid for their throne helped Lokietek seize control of almost all the territories of Malopolska, except for Krakow itself. Vaclav II made peace with the coalition, just before he died on 21 June 1305. He agreed to withdraw from Hungary. But to keep the margraves of Brandenburg on his side, the young Vaclav III renewed his father’s undertaking to cede Gdansk and Pomerania and prepared to enter Poland at the head of an army. If Vaclav had not been murdered at the instigation of discontented Czech lords on 4 August 1306, he and Lokietek might well have divided the Polish territories between themselves. Instead, Bohemia was plunged into rivalries over the succession, until the election of John of Luxemburg in 1310. In Poland, although the townsmen of Krakow reconciled themselves to Lokietek, most of Wielkopolska preferred to recognize Henry of Glogow.
In 1307, disaster struck Lokietek in Pomerania. The German patriciates of the two chief towns, Tczew and Gdansk, gravitated towards the margraves of Brandenburg; the Polish knighthood of the countryside remained loyal to Lokietek. In August 1308, the castle of Gdansk was besieged by the troops of margraves Otto and Waldemar. Lokietek called on the help of the Teutonic Knights. The arrival of their forces lifted the siege of the castle - which on the night of 14 November they proceeded to seize for themselves, massacring Lokietek’s men in the process. By the end of 1311, most of Polish Pomerania was 111 the Knights’ hands.