A better-than-expected third quarter profit report sent shares of the nation's largest railroad soaring almost 6% on Oct. 18.

The report came just days after investors learned that famed investor Warren Buffett had reduced his stake in Union Pacific and another railroad, Norfolk Southern (NSC), earlier this year. That news sent shares temporarily lower.

Union Pacific reported third quarter earnings of $2 per share, vs. $1.54 a year ago. According to Reuters Estimates, analysts were expecting earnings of $1.77 per share.

The railroad carried only slightly more freight, so its big profits came from price increases and especially an increase in productivity.

Union Pacific execs said the third quarter result wasn't a result of a stronger economy. The total volume carried by the railroad was up 1% despite the weakness in demand railroads have seen all year.

"Looking at the economy, we are not expecting much change from what we have experienced the first nine months of the year," chairman and chief executive James Young told analysts. He said what helped the company was "franchise diversity."

More than other railroads, Union Pacific serves a broad range of customers. While troubles in housing and auto industry caused some weakness, the railroad was able to make up for that by carrying coal, corn, wheat, fertilizer and other freight.

Investors already knew that Buffett was interested in railroads, including a 17% stake in Burlington Northern Santa Fe (BNI). But, on Oct. 15 it was disclosed that his Berkshire Hathaway (BRK) cut its ownership of Norfolk Southern from 6.36 million shares on March 31 to 3.76 million shares on June 30. A 10.5 million-share stake in Union Pacific fell to 7.41 million shares on June 30.

Railroads were a fashionable investment even before it was revealed this year that Buffett had placed bets on the industry's leaders. With high energy prices, railroads benefit from their fuel efficiency compared to trucking, along with a shortage of truckers.

Improving service and efficiency has allowed Union Pacific to "recapture share from other modes of transportation," Morgan Keegan analyst Art Hatfield wrote. In the past, service was not seen as Union Pacific's strong suit.

"The railroads are proving their ability to maintain pricing power and more effectively leverage their networks in a sluggish economy," he wrote, responding to Union Pacific's earnings. "As we look into 2008, we believe this trend will continue."

Still, there are big challenges for railroads. Rail is an expensive business, requiring a lot of capital for new improvements and maintenance. As rail demand increases, Kirkeby says, "The rails are pushing the upper bound of their capacity and need to spend very heavily to upgrade their systems."

Union Pacific, with 32,000 miles of track in the western two-third of the U.S., appears to have more bottlenecks than other railroads, Kirkeby says. (S&P, like BusinessWeek, is a unit of the McGraw-Hill Companies.)

In response to Union Pacific's news on Oct. 18, railroad stocks as a group were up 3.27%. Union Pacific's stock rose 5.84%, up $6.95 to end at $125.93 per share.

A key question is whether other U.S. railroads can follow Union Pacific's lead, improving efficiency and holding onto revenue despite a weak economy.

Burlington Northern, the nation's second largest railroad, reports its earnings on Oct. 23. Norfolk Southern's earnings arrive on Oct. 24. They may have trouble meeting expectations raised by their cousin from the West.