NAIROBI, Kenya — With sloping, charcoal-gray walls that resemble the elegant curves of a luxury car, Nairobi’s sleek new railway station, built by China, looks more like an airport terminal reserved for wealthy Kenyans and their private jets.

Given the price tag, it might just as well be.

President Uhuru Kenyatta’s government spent $4 billion on a 300-mile railway connecting the capital to the Indian Ocean port of Mombasa, the most expensive infrastructure project since Kenya’s independence 54 years ago and one-fifth of its national budget.

Eager to portray it as a major achievement ahead of national elections in August, Mr. Kenyatta opened the so-called Standard Gauge Railway last Wednesday. But the fanfare was overshadowed by a concern that has been snowballing for months, filling many Kenyans with mild terror: How can the country repay its monstrous debt to China?

China’s Eximbank accounts for about 90 percent of the Nairobi-Mombasa project. The loan has already pushed the Kenyan debt above 50 percent of output, and imports of Chinese supplies and materials required to build the railway are making people anxious about Kenya’s worsening trade imbalance with China.

The Kenyan government says that the railway will increase gross domestic product by 1.5 percent, and that the loan will be paid back in about four years. The government is also aiming to run the trains on electricity.

Image

Chinese employees helped passengers to scan their tickets.CreditAdriane Ohanesian for The New York Times

Ken Mugane, a Nairobi businessman who went on a test ride a few days before it opened officially, said the train was impressive, echoing widespread opinion that it would improve trade and reduce congestion. The Express service cuts travel time by about half — to five hours from 10.

But very little of it conjured an image of Kenya, he said, except maybe for the landscape. “It needs to look like it’s ours,” he said. “After all, we’re going to pay for it through our noses, aren’t we?”

Small details seemed designed to remind Kenyans that the project wasn’t a free ride, he joked. Pamphlets were in Chinese. Some staff members wore uniforms of red and gold — the colors of China’s flag. Even the music on the train wasn’t Kenyan, he complained.

The biggest surprise, Mr. Mugane said, was seeing a sculpture of Mao Zedong at the Mombasa station. (It was actually of Zheng He, a 15th-century Chinese explorer who sailed to East Africa.) The man putting it on a plinth was Chinese, Mr. Mugane noted. “Even that wasn’t being done by a Kenyan,” he said ruefully.

Despite such misgivings, Kenya wouldn’t have had its first new railway for more than a century – the last one was built by the British in 1901 – if it weren’t for Chinese loans and China’s strong record of getting projects built on time. It took less than four years for the line to be completed.

China’s state-run news media has celebrated its completion as demonstrating a Chinese commitment to African development.

Image

Passengers settling into the Nairobi-Mombasa train.CreditAdriane Ohanesian for The New York Times

The new Kenyan line “bears the Kenyan people’s dream for this century of striving for national development and prosperity,” a Chinese vice foreign minister, Zhang Ming, said in Nairobi this month. “This also shows China’s firm support for Kenya achieving independent and sustainable development.”

But on Kenyan television, reports about the railway’s opening invariably turned to its inflated cost, and to questions of corruption. On one show, a politician who had switched allegiances from the opposition to Mr. Kenyatta’s party and who extolled the railway’s virtues was quickly submerged by calls from viewers. “You are lying,” one person said. “You were bribed.”

As a result of the railway’s gargantuan cost, and the equally enormous task of repaying China, some Kenyans already have a nickname for it: the Lunatic Express 2.

The name Lunatic Express was coined more than a century ago to describe a colonial British railway so costly it was considered a “gigantic folly,” even by the standards of the Empire. The 660-mile line linked Lake Victoria with Mombasa. Thousands of laborers, most of them Indians, died from harsh working conditions, disease, hostile tribes and even man-eating lions.

In recent years, riding the train had become an act of lunacy itself. Passengers boarded a rusting, creaking millipede overtaken by trucks, buses and grazing animals that had claimed parts of the railway as resting spots.

The SGR, its Chinese successor, travels much faster, averaging 74 miles an hour, and is designed to carry 22 million tons of cargo a year. Its construction involved little foreign labor or murderous animals. The lunacy, many Kenyans say, is the idea of generations being chained to China, long after Mr. Kenyatta and his coterie leave office.

Image

The Railway Museum in Nairobi.CreditAdriane Ohanesian for The New York Times

“It’s madness,” said Samuel Nyandemo, a senior lecturer in economics at Nairobi University, who was visibly outraged. Why, he almost shouted, is the railway twice as expensive as a similar project in neighboring Ethiopia or Morocco? And why was the tendering process done behind closed doors, if not to allow Kenya’s political elite to pocket vast sums of kickbacks?

“This is another type of lunacy,” he said.

There are parallels between the old Lunatic line and its replacement, said Elias Randiga, the assistant director of the Railway Museum in Nairobi, a stone’s throw from the original Nairobi Station.

Shabby and dilapidated, it had imposing lettering on one wall that read (as if to drive the point that lower classes weren’t welcome), “Upper Class Booking and Ticketing Office.”

Opened in 1899, the building was constructed on marshland used by Maasai pastoralists to graze their cattle. The name Nairobi is derived from the Maasai word meaning “a place of cool waters.”

Today, a cacophonous, chaotic city shoves itself onto the grounds of the prim Victorian station. “Matatu” buses unceremoniously dump off passengers, while businessmen in suits buy fruit from village women. A bright-red election bus spilling over with President Kenyatta’s supporters recently snarled traffic, as some hopped off and strutted to Kenyan pop music and the honking horns of irritated drivers.

The British railway, Mr. Randiga said, was built to extract and ship out natural resources from the African interior, something that many Westerners frequently accuse China of doing.

Image

Scenes from the construction of the the British railway known as the Lunatic Express are painted on a wall outside the museum.CreditAdriane Ohanesian for The New York Times

The Indian laborers working for the British faced a hostile environment, including the sheer physical challenge of laying down 17,000 miles of track that climbed into mountains and then descended into the Great Rift Valley.

More than 4,000 people died during the railway’s construction. Among them, dozens were killed and eaten by lions, including one British man who was dragged out of his bed by one. “Tsavo camp remained very much a man-eater’s chophouse,” wrote Charles Miller in “The Lunatic Express,” a book about the railway’s construction, referring to the region that became Tsavo National Park.

Lion attacks were so bad that Indian laborers went on strike, Mr. Randiga said. “There was a myth among Indians that they were targeted because they ate spice and lions liked spice,” he said, taking out a small plastic box from a drawer and presenting it. In it were century-old claws that belonged to one of the lions, yellowed and smooth like pieces of ivory. (“I keep them under lock and key,” he said.)

The Chinese railway has also not been without controversy. At least 10 elephants were killed during construction when they collided with trains, according to Save the Elephants, a nongovernmental group.

Just as there has been local opposition to the Chinese-made railway over land issues, the British were attacked by a tribe led by a man who had prophesied that an “Iron Snake” would lure its people and colonize them.

“Which turned out to be true,” said Mr. Randiga.

He proceeded to recite a poem by a British politician, Henry Labouchere, who opposed the railway’s construction back in the early 1900s. It says, in part:

Where it is going to, nobody knows.

What is the use of it, none can conjecture.

What it will carry there’s none can define.

It is clearly nought but a lunatic line.

Mr. Randiga paused, and laughed. “We have the same debate today.”

Chris Buckley contributed reporting from Beijing.

A version of this article appears in print on , on Page A4 of the New York edition with the headline: Kenyans Fear Chinese-Backed Railway Is Another ‘Lunatic Express’. Order Reprints | Today’s Paper | Subscribe