Not long ago, Chinese engineers were putting the finishing touches to two expensive rail projects in east Africa, one linking Djibouti on the Red Sea to landlocked Ethiopia and the other running from the Kenyan port of Mombasa to the capital, Nairobi.

But less than 18 months after both lines were inaugurated with grandiose talk of Chinese-led east African integration, doubts are emerging about their economic viability. The $4.5bn Djibouti-Addis Ababa line, the first fully electrified cross-border railway in Africa, has run into financial and operational difficulties, while the $3.2bn Kenya route is losing money and has been plagued by scandal.

Push-back over the viability of these and other projects is driving a change in Beijing’s approach to investment in Africa. After nearly 20 years of pouring money into infrastructure projects across the continent, China’s president Xi Jinping said in September that “vanity projects” must be shunned in favour of more carefully conceived initiatives that address proven economic bottlenecks.

The following month The People’s Daily, the Chinese Communist party’s mouthpiece, warned that Beijing should “pay more attention to how projects connect with the development and basic interests of relevant countries”.

Railways in east Africa have a long history of problems. The original Mombasa-Nairobi line, built by the British in the late 19th century, was so costly in both money and lives that it became known as the “Lunatic Express”.

Beijing’s reputation is not all that is at stake: Chinese sponsors are losing money. Wang Wen, chief economist at Sinosure, said the Chinese state-owned insurer had been forced to write off $1bn in losses on the Djibouti-Addis Ababa link. Due diligence on the 718km railway had been “downright inadequate”, he said.

We knew from the very beginning that [the Mombasa-Nairobi line] was a lemon of a project and it is simply becoming more and more apparent every day

Mr Wang’s comments came after Abiy Ahmed, Ethiopia’s prime minister, in September negotiated easier terms with China on $4bn of railway loans, extending the repayment period from 10 to 30 years. The move followed a foreign exchange crisis that hit Ethiopia’s ability to maintain the railroad and repay its debts to Chinese state creditors, analysts said.

Meanwhile, criticism of the Mombasa-Nairobi line, Kenya’s biggest infrastructure project since it gained independence in 1963, has increased. Three Chinese nationals working for the China Road and Bridge Corporation were last month charged in Kenya with attempting to bribe local officials investigating an alleged ticketing scam that was said to be depriving the railway of $10,000 a day in revenue.

The rail line had failed to achieve its goal of cutting congestion on the parallel highway by shifting freight from trucks to trains, said John Githongo, a Kenyan anti-corruption campaigner. The highway was as busy as ever, he added. Bechtel, a US construction company, even planned to build a $3bn road along the same route, he said.

“We knew from the very beginning that this was a lemon of a project and it is simply becoming more and more apparent every day,” Mr Githongo said.

Beijing in September signalled its concern about the economic case for the line, turning down a request to fund an extension towards the Ugandan border until a full feasibility study had been conducted.

Recommended The Chinese model is failing Africa

China has for years prioritised infrastructure in Africa, building roads, bridges, airports and power stations, from Ghana to Mozambique, for governments keen to emulate the formula that helped kick-start its own rapid development from the 1980s. While the west has long stressed governance and institution-building as engines of development, Beijing has advocated big projects with the potential to link markets, raise productivity and spur industrialisation.

However, as in China itself, some have turned out to be white elephants, while others have failed to generate enough return to service the original loans used to fund them.

The Djibouti-Addis line, for example, has been crippled by electricity shortages and lower than expected use. “While its passenger capacity has been growing, on the freight side the uptake of the railway by industrial manufacturers and exporters has been very lacklustre,” said Yunnan Chen, a researcher at the China Africa Research Initiative at Johns Hopkins School of Advanced International Studies.

The railway’s prospects have dimmed further with the signing of a peace deal in July between Ethiopia and Eritrea, which gives Ethiopia access to the Eritrean ports of Assab and Massawa. When the line was originally conceived, it was intended to connect Ethiopia with the port of Djibouti, at that time its sole access to the sea.

Hallelujah Lulie, a regional analyst based in Addis Ababa, conceded that the line was not “fully operational” and that there were “definitely some reservations”. But, he said, in spite of teething problems, the railway — which links Ethiopia’s industrial free-trade zones and large-scale farming projects to export markets — made long-term economic sense. “It’s going to be a vital lifeline for the economy,” he added. “It has issues, but I don’t think there are strong reservations about the project itself.”

China is not the first “big imperium” having difficulty trying to build a railway in Kenya, said Mr Githongo. “But the difficulty is not so much for the Chinese. It is for the poor Kenyans who will have to pay the money back.”

Copyright The Financial Times Limited . All rights reserved. Please don't copy articles from FT.com and redistribute by email or post to the web.