Two years ago, Gabe Claypool had nothing to do with oil and railroads.

Today, he is CEO of a Wayzata-based company that ships 3.5 percent of North Dakota's oil to East Coast and other refineries in railroad tank cars.

The company, Dakota Plains Holdings, is part of a revival of the old way of shipping crude oil -- via rail -- that last flourished during World War II. And it's another case of North Dakota's oil boom igniting spinoff businesses.

"If the capacity to move oil isn't there by pipeline, the only alternative is to get it out by rail -- or you stop producing oil until the pipelines catch up," Claypool said in an interview.

Claypool, 37, who grew up on a farm in Hampton, Iowa, was living in Minnesota in 2011 when investors in Wayzata and Minneapolis approached him to run their start-up crude-oil-to-rail business. At the time, he was a manager at a networking company and had spent nearly a decade at AT&T.

He was puzzled initially that anyone would ask him -- a farm kid working in the technology industry -- to run an oil business, he said. Then someone explained that the business model "is remarkably similar to a farmers' elevator," he said.

Dakota Plains in 2010 opened a crude-oil-to-rail loading terminal in New Town, N.D., in the Bakken oil region. The company was among the first to see that pipeline capacity would be insufficient to ship all of the region's oil.

Crude oil is brought to Dakota Plains' rail terminal by truck, then put on trains of up to 120 tank cars stretching more than a mile. Dakota Plains was the first crude-to-rail terminal on Canadian Pacific's North Dakota system, and it already has been expanded, with more growth planned.

Claypool said the company's 1,100 leased tank cars have carried crude to Albany, N.Y.; Philadelphia; St. John, New Brunswick; Galveston, Texas, and Walnut Hill, Fla.

Today, 20 crude-to-rail terminals have sprouted along the North Dakota tracks of Burlington Northern Santa Fe and Canadian Pacific. In November, the railroads hauled 57 percent of the region's crude.

Boom for railroads, too

An estimated 200,000 tank-car loads of crude oil rode the U.S. rails last year, up from just 9,500 in 2008, the Association of American Railroads says. That level of crude oil traffic hasn't been seen in decades. In Minnesota, crude oil pipelines began replacing rail in the early 1950s.

More pipelines are planned in North Dakota, Minnesota and other states, but they are years away from completion.

BNSF, owned by Warren Buffett-led Berkshire Hathaway, said it shipped 100 million barrels of crude in 2012. It also invested nearly $200 million last year in North Dakota and Montana, and has hired more than 560 new workers since 2011, the company says.

"One of the reasons why the oil industry has really taken to heart the expansion of crude by rail is the flexibility," said John Miller, vice president of industrial products sales for BNSF. "If you load a unit train in North Dakota, you can go to the West Coast, you can go south or to the East Coast."

Miller said BNSF expects crude traffic to pick up in the East as more unloading terminals are built there. Many East Coast refineries want the lighter crude oil produced in North Dakota because they aren't equipped to refine heavier crude from Canada and elsewhere.

Canadian Pacific, whose U.S. operations are based in Minneapolis, has reported five consecutive quarters of double-digit growth in its crude-by-rail business, and now transports 70,000 tank cars of crude annually, up from about 500 in 2010. That's just the beginning. "We see that increasing two to three times in three years," said Tracy Robinson, CP's vice president for energy.

In Canada's oil sands region, producers are copying the crude-to-rail business model, adding terminals to load tank cars.

"You can get onto rail easily, with low capital, and the rail infrastructure is there," Robinson said. "Relative to other modes, we are very flexible. We don't need long-term commitments and big volumes. You can make much shorter-term deals, and you can access rail if you are not a big player."

Railroads also are making money shipping equipment, pipe and sand to the oil fields. The sand, which is mined in Wisconsin and Minnesota, is used in hydraulic fracturing, one of the technologies driving North Dakota's oil boom.

Dakota Plains' strategy

The oil-rail profits are flowing partly because of the price difference between oil sold on the East Coast and the midcontinent price at Cushing, Okla. The glut of oil being piped from North Dakota into Cushing means it often sells at a $20 discount per barrel compared with the East Coast price.

Claypool said rail shippers typically charge $16 to $18 to take a barrel of oil to East Coast. Shipping by pipelines costs a third of that, but many distant refineries can't get North Dakota oil by any means except rail, he said.

He's betting oil producers will have long-term need for rail. Among the refineries that benefit from rail is one in Philadelphia purchased last year by Delta Air Lines, which hopes to reduce its jet fuel costs.

Dakota Plains also has expanded into crude oil marketing -- buying oil at the wellhead and selling it to refiners. It launched a trucking venture last September, and now transports crude from wells to its terminal. With further terminal expansion, the company hopes to begin receiving rail shipments of sand, equipment and pipe bound for oil fields.

The company relies on venture partners or contractors for day-to-day operations, and has just four employees on its payroll. Its partners, including World Fuel Services, a global oil marketing and logistics company based in Miami, bring Dakota Plains' worker count to more than 100.

In March, Dakota Plains stock began trading over the counter. Claypool aims to have the stock listed on a major exchange this year. Instead of an initial public stock offering, the company merged with an existing but non-operating public corporation.

Lately, Claypool has been on the road, telling the company's story to investment managers with some success. In December, the New York investment fund Gilder Gagnon Howe & Co. acquired a 7.8 percent stake in the company.

Northland Capital Markets of Minneapolis issued its first research report on Dakota Plains last month, rating it a buy with target price of $5. The stock has been under $4.

Reed Anderson, a Northland analyst, said distant refineries like those in Philadelphia will be hard to reach by pipeline.

"It is one thing to run a pipeline across northern Minnesota -- try running a pipeline through a metro area on the East Coast," he said. Rail gives oil producers options to sell at better prices, he added. "That is why it is here to stay."

David Shaffer • 612-673-7090 Twitter: @ShafferStrib