Slowly, like the trains that crawl past towering avenues of containers here at the country's largest rail hub, Mexico's freight business has transformed into a principal artery for the top export industries of Latin America's second-largest economy. A rail network that once shunted Mexico's mustachioed revolutionaries to battles across the country was gasping for air by the late 1990s as grinding inefficiency and rising costs forced the government into privatization. But gradually, thanks to private investment, the North American Free Trade Agreement, a bulging wage differential with China and booming auto and manufacturing sectors, Mexico's freight sector has morphed into a top logistical thoroughfare, shuttling cars, fridge-freezers and grains across the border. A planned government reform that seeks to allow foreign investment in the state-controlled oil sector, coupled with a federal commitment to spend over $20 billion on infrastructure this year alone, has helped raise expectations for the industry. Mexican trains now haul about 14 percent of the nearly $500 billion worth of goods that cross the Mexico-U.S. border each year, up from 10 percent in 2009. And with some saying total bilateral trade could double in the next five years, having already jumped 62 percent between 2009 and 2012, it's a trend that looks set to continue. "We're very conscious of the boom that's coming," said Isaac Franklin, chief financial officer at Ferromex, a joint subsidiary of Mexican miner Grupo Mexico and U.S. railroad Union Pacific, and one of Mexico's three railway concession-holders. Grupo Mexico will invest a record $536 million in its rail business this year, a 10 percent increase on the usual spending level, on infrastructure, maintenance and equipment. For a map graphic, see: link.reuters.com/hem49t Seven years ago, the Ferrovalle terminus, a 1,000-hectare (2,472-acre) expanse in the heart of Mexico City, where yellow-flowered cacti sprout from the tracks, handled 150,000 containers a year. This year, Ferrovalle's director, Erich Wetzel, said he expected 400,000 containers. A recently launched app lets customers keep tabs on the exact location of their goods. "Our growth is limited by the size of the area," Wetzel said. "We calculate that by 2017, we'll be near capacity here." Rewind 16 years to when Mexico privatized its railways and it shipped less than 20 percent of its total cargo by rail. Today, Mexico's network, which is fully integrated with the North American system, allowing customers to move products seamlessly from Monterrey to Montreal, has a 26 percent market share. Within a decade, experts say, if the government's proposed reforms take effect and Mexico's small but fast-growing aerospace and high-tech engineering sectors gain momentum, market share could rise to 35 percent, just below U.S. levels.\ Train Duopoly Controlled both by Kansas City Southern de Mexico and Grupo Mexico via its Ferromex and Ferrosur subsidiaries, Mexico's freight sector is piggybacking the growth of leading export industries such as cars and electronics. Infrastructure y Transportes Mexico (ITM), which groups Ferromex and Ferrosur and makes up nearly a fifth of Grupo Mexico's total revenues, has 55 percent of the Mexican market, with Kansas City Southern de Mexico controlling the rest. That has fueled rumors of an upcoming IPO for ITM, and a possible takeover of Kansas City Southern, which derives just under half its revenues from its Mexican operation. "It's hard to give you a date," said Ferromex's Chief Executive Rogelio Velez, when asked if the spin-off could happen this year. "We're analyzing it and if the conditions are right, it could be in that time frame." Kansas City's blossoming cross-border business has positioned it better than most U.S. railroads, whose heavy dependence on coal shipments has hurt them since early 2012 as demand for coal slumped, making i