ASTANA, Kazakhstan — The railroad locomotive factory here on the outskirts of the capital of Kazakhstan is one of the most modern in the world, with huge yellow overhead cranes and a work force of 1,100. An engine factory being built next door will soon make some of the world’s most fuel-efficient 12-cylinder diesel engines.

But in Aktogay, a Kazakh rail junction town 600 miles to the southeast, the roads are mostly dirt and the houses are low and cramped. Just a few yards outside the entrance to the main freight rail yard, cars swerve to avoid a pothole more than a yard across and deep enough to snap an axle.

With oil finally having started to flow in September from the vast Kashagan field in the shallow Kazakh waters of the Caspian Sea, this big but sparsely populated Central Asian nation is considering how to spend its coming wealth. An early beneficiary is the country’s sprawling railroad network, a large, state-owned business empire. It is investing heavily with cash from the country’s oil-financed sovereign wealth fund and is now considering initial public offerings for one or more of its business units.

The rail business, Kazakhstan Temir Zholy, better known by its initials as K.T.Z., reached a deal this summer to build a $100 million freight and logistics center on the coast of China at Lianyungang port, roughly halfway between Beijing and Shanghai. The goal is to bring goods in and out of Central Asia through a combination of rail and sea freight, and help the region diversify its exports beyond an overwhelming dependence on Russia that has lasted for more than two decades after the demise of the Soviet Union.