Hungarian-Romanian relations are foreign relations between Hungary and Romania. Relations between the two nations date back to the Middle Ages, including Wallachia and Moldavia. Modern diplomatic relations between the two states date back to Romanian unification in 1859 and independence in 1877. Both countries share 443 km (275 mi) of common border. Both nations are full members of NATO and of the European Union. However, there are historical nationalist tensions over Transylvania.