The Una river forms a natural border between Croatia and Bosnia a number of times. Its well is in Croatia, but turns into a border river for the next 8.5 km until it reaches a rail bridge a bit before the Bosnian town of Martin Brod. From the rail bridge the Una enters Bosnia completely and flows for 21 km, before reaching the border between the two countries for the second time, 9 km downstream town of Kulen Vakuf. From here it forms the border for the next 20 km, all the way to another rail bridge between the villages of Malo Seoce and Užljebić. Here the Una enters Bosnia completely for the second time, and near Ripač it winds more north-westwards, entering Bihać, and turning north to Bosanska Krupa and Bosanska Otoka. After 85 km of flowing through Bosnia, the Una again marks the border between Bosnia and Herzegovina and Croatia for the third and final time, near the villages of Dobretin and Javornik (Croatia).