Under a decree dated 21 May 1856, the government of the Papal States gave the Marquis of Casa Valdés [es] a concession to build and operate a railway between the cities of Ancona and Bologna.
[15] On 16 August 1856, the government approved a statute founding the Società Generale delle Strade Ferrate Romane, established for the construction and operation of the Rome–Ancona railway and its extension to Bologna.
As a result of the Roman railways' poor financial condition, which worsened after the 1870s, the management of the line finally passed to the Società Italiana per le Strade Ferrate Meridionali, which retained it following the 1885 reorganisations.
[citation needed] After 1905, following the enactment of the "Fortis" law, which nationalised the railways, the management passed to Ferrovie dello Stato.
[26] Between 2016 and 2018, Riccione's railway station was modernised as part of a programme to increase the speed of trains on the line.
It is equipped with the Sistema Controllo Marcia Treno train-control system,[31] centralised traffic control (Bologna Centrale–Castelbolognese Riolo Terme) and Sistema di Comando e Controllo (Castelbolognese Riolo Terme-Ancona Marittima)[32] (another form of centralised traffic control).
Following Imola, the line continues southeast to the station of Castelbolognese-Riolo Terme [it], which was adjacent to the terminus of the Castelbolognese–Riolo Bagni railway [it] that closed in 1933.
The line continues southeast past the stations of Villa Selva [it] (opened in 2009), Forlimpopoli-Bertinoro [it], Cesena, Gambettola [it], and Savignano sul Rubicone [it].
After passing Savignano, the line takes a southerly bearing, and curves on an easterly course before reaching the station of Santarcangelo di Romagna [it].
It runs adjaent to Metromare, a segregated trolleybus rapid transit line between Rimini and Riccione that opened in 2019, with fifteen intermediate stops.