This paper presents a game-theoretic model of a liberalized railway industry in which train operation and ownership of infrastructure is fully vertically separated. The objective of this paper is to analyze how the regulatory agency will socially optimal set access charges and how this behavior changes with increased competition in the railway market. Our analysis shows that an increased number of competitors in the freight and/or passenger segment reduces prices per kilometer and increases total output in train kilometer. The regulatory agency reacts to more competition with a reduction in access charges in the corresponding segment. Consumers benefit through lower prices while the effect on the operators' profits is ambiguous and depends on the degree of competition. We further show that social welfare always increases through more competition in the freight and-or passenger segment of the railway market.