Koznitsa is a railway tunnel under the Koznitsa ridge in the Stara planina (Balkan Mountains), the longest tunnel in Bulgaria. The tunnel is located between the Bulgarian towns of Koprivshtitsa and Klisura and is 5,808 m long. It is the seventh tunnel on the Sofia-Karlovo line, starting at the exit of Koprivshtitsa station and ending just before Stryama station. Along its entire length the tunnel is straight and at Koprivshtitsa the lights of the locomotive are visible a long distance into the tunnel.