The main Puerto Rico rail system was created during the late 19th century and was significantly expanded during the early 20th century due to a growing sugar cane industry in the island. Its origins can be traced back to 1874, when a Spanish engineer proposed building a steam railroad line along the coast of Puerto Rico. The study for this project served as a base for the definitive construction, which began in 1888. It would take almost 20 years to complete the whole route from San Juan to Ponce. The main system began operations in 1891, when the northern line was built between San Juan (in the Martín Peña sector) and the town of Manatí, followed by extensions to the towns of Carolina (to the east) and Arecibo/Camuy (to the west) the following year. When the United States invaded Puerto Rico in 1898, the system already had approximately of railroad tracks.