 It was also built in order to enhance the protection from the Hungarian excursions from the north, provided by the existing Smederevo and Golubac fortresses.The fortress lost its strategic importance in 1521 when the Ottomans defeated Hungarians and spread their territory across the Danube, thus leaving Ram Fortress in the hinterland of the Ottoman Empire.According to the legend, while the sultan was inspecting his troops, he stopped to take a rest on a small hill from which it had an excellent view on the Danube and the Hungarian lands across the river.