Union Pacific (UNP) - Get Report  posted stronger-than-expected second quarter earnings Thursday, even as freight revenue declined, easing investor concern over a trade-related slump in the U.S. transport sector.

Union Pacific said earnings for the three months ending in June came in at $2.22 per share, up 12.1% from the same period last year and well ahead of the Street consensus forecast of $2.14 per share. Group revenues, Union Pacific said, fell 2% to $5.6 billion, a figure that fell largely in-line with analysts' forecasts. 

The group also said its operating ratio improved by 3.4 points to 59.6%, while quarterly diesel fuel prices fell 4% from last year to $2.21 per gallon.

"We delivered record second quarter financial results driven by exceptional operating performance, including an all-time best quarterly operating ratio of 59.6 percent," said CEO Lance Fritz. "These results are a testament to the dedication of the men and women of Union Pacific, who are embracing Unified Plan 2020 and who worked closely with our customers to overcome numerous weather challenges."

Union Pacific shares closed 6.2% higher at $174.25 on the news.