The Mongols destroyed large territories during their invasion of Eastern and Central Europe in 1241 and 1242. The Mongols' Golden Horde emerged as the dominant power of Eastern Europe, but Béla IV of Hungary's land grant to the Knights Hospitallers in Oltenia and Muntenia shows that the local Vlach rulers were subject to the king's authority in 1247. Basarab I of Wallachia united the Romanian polities between the southern Carpathians and the Lower Danube in the 1310s. He defeated the Hungarian royal army in the Battle of Posada and secured the independence of Wallachia in 1330. The second Romanian principality, Moldavia, achieved full autonomy during the reign of Bogdan I around 1360. A local dynasty ruled the Despotate of Dobruja in the second half of the 14th century, but the Ottoman Empire took possession of the territory after 1388.