The Beijing Subway is a rapid transit rail network that serves the urban and suburban districts of Beijing municipality. The network has 18 lines, 319 stations and 527 km (327 mi) of track in operation, and is the second longest subway system in the world after the Shanghai Metro.