During the 18th century and various Ottoman–Habsburg wars (1683-1699, 1716-1718, 1735-1739, 1788-1791), Ram partially regained its former importance. The interior of the fortress was demolished during the Serbian anti-Ottoman Koča's frontier rebellion in 1788. From then on, the life within the tower slowly withered, until the fortress was evacuated altogether by the Ottomans in the mid-19th century.