A spokesperson for the Portland & Western Railroad said the train was carrying urea and agricultural fertilizers.