Union Pacific (UNP) reported better-than-expected third-quarter earnings on Thursday, led by sharp increases in automotive and chemicals shipments and stronger pricing.

The Omaha, Neb.-based railroad company posted net income of $1 billion, or $2.19 a share, compared with a year-earlier $904 million, or $1.85, beating average analyst estimates in a Thomson Reuters poll by a penny.

Revenue for the three months ended Sept. 30 was $5.34 billion, up 5% from $5.1 billion a year ago, narrowly missing the Street’s view of $5.38 billion.

Quarterly freight revenue climbed 4% year-over-year with the help of stronger prices and higher shipment volumes of chemicals, automotive and intermodal. The gains were partially offset by declines in coal and agricultural products.

"Despite a 12% decline in coal volumes and significantly weaker steel and scrap metal markets, we generated best-ever financial results across the board," Union Pacific CEO Jack Koraleski said in a statement. 

Shares of Union Pacific improved more than 2% on Thursday to $126.37.

Koraleski said political and financial challenges in the U.S. that have increased economic uncertainty require Union Pacific to be just as agile in the current quarter, but that the company is prepared to adapt to changing market conditions. 

Follow Jennifer Booton on Twitter at @Jbooton