OMAHA, Neb. >> Both Union Pacific and CSX delivered solid results in the fourth quarter as the railroads prepared to deal with whatever challenges President Donald Trump’s administration or the economy might present this year.

If Trump follows through on his threat to impose tariffs on America’s two biggest trading partners of Mexico and Canada, that would hurt the imports railroads deliver, but if the Federal Railroad Administration eases regulations and approves some of the waivers the industry has been pursuing for years and taxes change that would help the bottom line. So the effects of Trump taking over will be mixed.

UP CEO Jim Vena said that “in my 48 years of railroading, I’ve never entered a year without some economic question mark.”

“I’m hoping that it’s a negotiating position by the president because I don’t think anybody — the consumers in the U.S. — would love to have increases in prices because of a dispute, unless there’s some strategic reason that the president needs to do that for the security of the country,” Vena said.

For years, Union Pacific and the other major railroads have been asking to get waivers from some inspection requirements because they believe new high-tech automated inspection tools can replace some human inspections. Unions have opposed that and argued that new inspection technology should supplement human inspections.

The key for any railroad is to haul freight as efficiently as possible so you can deal with whatever comes, Edward Jones analyst Jeff Windau said. Both Union Pacific and CSX got more efficient in the quarter.

The Omaha, Nebraska-based Union Pacific reported $1.76 billion profit Thursday, or $2.91 per share, to easily top Wall Street expectations. That’s up from $1.65 billion, or $2.71 per share a year ago. The railroad improved its bottom line even though it had an additional one-time cost related to some buyouts of brake persons in one region that added $40 million in costs.

Wall Street expected Union Pacific to report earnings per share of $2.80 on average, according to the survey of analysts FactSet Research did.

Revenue slipped 1% to $6.12 billion in the quarter even though volume was up 5% because much of the additional shipments were intermodal carloads that are less profitable than coal and other categories. Analysts expected the railroad’s revenue to be $6.15 billion.

Union Pacific said it is on track to achieve its long-term goals to deliver high single-digit to low double-digit earnings per share growth over the next three years.

Union Pacific and CSX are two of the nation’s five largest freight railroads with Union Pacific operating in the west and CSX serving the Eastern United States.

CSX said it earned $733 million, or 38 cents per share, in the quarter. That’s down from $882 million, or 45 cents per share, a year ago. CSX’s profit was weighed down by a one-time $108 million accounting charge related to the goodwill for its Quality Carriers specialty trucking unit.

Without that charge, CSX would have made $815 million, or 42 cents per share.

Revenue was down 4% at $3.54 billion as the railroad brought in less fuel surcharge revenue. That was just below Wall Street expectations and expenses were 3% higher.

CSX started the quarter by dealing with the aftermath of Hurricanes Helene and Milton, but officials said in October when the railroad reported third-quarter results that it was able to quickly get its trains moving again.