The first railway in Crimea (Krim in Russian and Ukrainian) was a military railway constructed by British forces during the Crimean War in 1855. It was built to Indian (1675mm) gauge to take advantage of equipment then under construction for the subcontinent which could readily be diverted to Crimea. The completed railway totalled about 23 km. On the cessation of hostilities the following year, the railway was dismantled and all its assets dispersed.
The first public railway in Crimea was opened by the Russian Empire in 1869, connecting the principal city and major port of Sevastopol with Kharkov / Kharkiv, and ultimately via Kursk to Moscow. It was built to Russian (1520mm) gauge, as were later lines in the region.
In 1954, Crimea became part of the Ukrainian SSR and hence part of Ukraine on the dissolution of the Soviet Union.
In 2014, following Russian military occupation and a referendum of disputed legality, Crimea declared its independence from Ukraine and resolved to become part of the Russian Federation. The Union was ratified by Russia but has not been recognized by Ukraine nor by the greater part of the international community. However, the region is now effectively under Russian control.
For a time, train services continued to be provided by Ukrainian Railways, albeit with border controls for entry to / exit from Crimea. However, by 2015, all rail traffic between Crimea and the remainder of Ukraine had been suspended. Trains within Crimea are now operated by Crimea Railway. A train ferry across the Kerch Strait connects Port Krim in Crimea with Port Kavkaz in Russia proper.
Flag image from Wikipedia