Railroad operator Kansas City Southern (KSU) - Get Report  was rising 3.5% Wednesday after reporting first-quarter results that topped analysts' expectations. 

The company reported first-quarter net income of $1.54 per share on a 6% increase in revenue to $675 million. Those totals topped analysts' expectations of earnings of $1.44 per share on revenue of $669 million.

The company said that a protest by teachers who blocked tracks for four weeks starting on Jan. 14, disrupting shipments between Toluca, near Mexico City, and the Pacific Ocean port of Lazaro Cardenas, resulted in a 1% decline in car loads in the quarter. 

Rival CSX (CSX) - Get Report  rose more than 4% Wednesday after also reporting earnings that topped estimates

The Jacksonville, Fla.-based freight company said it earned net income of $834 million, or $1.02 a share, in its first quarter, vs. $695 million, or 78 cents a share, in the comparable year-earlier period.

The results topped Wall Street expectations. The average estimate of analysts surveyed by FactSet was for earnings of 91 cents a share.

Revenue was $3.01 billion in the period, matching analysts' forecasts and "driven by merchandise volume growth and broad-based pricing gains," the company said. Expenses dropped 2% year over year to $1.79 billion, "driven by continued efficiency gains."