The first railway in what was then Dahomey was opened in 1906 between the port of Cotonou and Ouidah, a distance of about 45km. The gauge chosen was metre gauge, typical for a French colonial railway of the time. The main line was extended in stages to reach Parakou (437km from Cotonou) by 1936. Several other lines were built, but these have subsequently closed. This left the main line to Parakou the only line in the coutry, until the reopening of the short stretch from Cotonou to the capital, Porto Novo, in 1999.
There are plans, sponsored by the governments of Bénin and Niger and by the Africarail consortium, to extend the Parakou line as far as Niamey, the capital of Niger. A little over 300km of the extension would lie within Bénin.
Africarail also proposes a rail link from Cotonou to Lomé in Togo.