Which was the first Latin American country to have a railway system?

History Trivia: Which was the first Latin American country to have a railway system?