“Many well-known guests have stayed here,” says Jimmy, the proprietor of the gift shop in the Hotel Continental, a stately pre-colonial landmark overlooking the Strait of Gibraltar. He runs down the list: Edgar Degas, Winston Churchill, Paul Bowles. But that was a long time ago.

Today, once-glitzy Tangier isn’t the destination it was half a century ago, when renowned artists and foreign spies haunted its bars and hotels. But the city’s fortunes may soon shift. A new high-speed railway, the first in Africa, was inaugurated last month, linking the cities along Morocco’s western edge. “In two hours, it will take you from Casablanca to here,” says Jimmy – more than twice as fast as the current trains.

Officials believe the timing is right for the $2bn (£1.56bn) endeavour, a form of infrastructure that amounts to a formidable financial commitment for a lower-middle-income country. Less a mode of transport than a symbol of progress, the French-built bullet train is intended to notify the world – and the world’s foreign investors – that Morocco has arrived.

“The government sees this as a flagship project that enables Morocco to shine in Africa,” says Riccardo Fabiani, a geopolitical analyst who studies the region. “The prestige factor is important.”

That factor has the caught the attention of other African countries, some of whom see such flashy infrastructure projects as a way to lure investment from abroad. “In French, it’s called les grands chantiers, the closest translation of which is ‘grand design’,” says Zouhair Ait Benhamou, a PhD candidate at Paris Nanterre University who studies large-scale public works projects. Countries from Laos to Sri Lanka have embraced this model, placing big bets on expensive infrastructure financed by loans from offshore investors, often with mixed results.

But proponents of the strategy argue that Morocco is uniquely positioned to capitalise on it. Political and economic pragmatism have propelled a business-friendly development boom, bringing eco-resorts to the Mediterranean coast and a dazzling new airport terminal to Marrakech. Today, Morocco has one of the longest modernised networks of highways in Africa, and a massively expanded deep sea port just nine miles across the water from Spain. “High-speed rail fits within this model, which is supposed to take Morocco beyond its present growth rate,” says Benhamou.

Critics, however, say that the blockbuster projects mask a ground-level sense of stagnation. Morocco ranks lower than most of its north African neighbours on the UN’s human development index. Schools are overcrowded and ill-equipped, and there is only one doctor per 1,600 residents – less than half as many as in next-door Algeria – putting the country at risk of a public health crisis.

Workers begin first-day of construction for the TGV high-speed train line linking Casablanca to the south via the capital Rabat. Photograph: Stringer/Reuters

For this reason, many have questioned Morocco’s decision to accept nearly a billion dollars from France, and another half-billion from a handful of Gulf states, to finance a high-speed railway. Most of the money came through loans that will need to be repaid. To cover these debts, a ticket from Casablanca to Tangier would have to be priced between 600 and 700 dirhams (£50-£58), according to Stop TGV, a coalition that tried to stop the project. Yet Morocco’s national rail operator, ONCF, announced that the price of economy-class tickets will be a fraction of that, topping out at 224 dirhams.

Even that may be too high to attract a significant number of passengers. Outside Rabat’s threadbare railway station, Ahmed Hakim, a 32-year-old resident of Marrakech, says that even after the high-speed service launches, he’s likely to stick to Morocco’s cheaper conventional trains, which are among the most comfortable and reliable in Africa.

“Why would I need to get from Casablanca to Tangier in less than four hours?” he asks. “Moroccans spend four hours sitting in a cafe. If we want to travel, we have time.”

Hakim believes the railway project is a sweetheart deal with France, which still holds powerful sway in Morocco 62 years after relinquishing its colonial grip. A deal struck with former French president Nicolas Sarkozy launched the project in 2011 with little public debate, and Alstom, the French train manufacturer, won the contract. On 15 November, when President Emmanuel Macron landed in Tangier to join King Mohammed VI in inaugurating the railway, the train that whisked them to Rabat was driven by a Frenchman.

French President Emmanuel Macron and Moroccan King Mohammed VI inaugurate a high-speed line at Tangier station on 15 November. Photograph: Christophe Archambault/AFP/Getty Images

Omar El Hyani, a Rabat city councillor and vocal critic of the railway, laments the fact that despite the costs, many Moroccans support the project. “In Morocco, when you present people with a fancy new idea, they tend to agree with it,” he says. It’s particularly true when it’s backed by the king and the makhzen, the elite ruling class that demands such projects, he adds. “They’re very skilful in putting out propaganda that presents these projects as a stepping stone toward something great.”

To promote this perception, the government has built a palatial new railway station in Rabat. The terminal seems to emphasise that the optics of the project are at least as important as its functionality. “The government is presenting an image of the country that will lure the global business class,” says Fabiani.

But there’s a cognitive dissonance to this strategy. “Fighting corruption, cutting red tape, economic reforms – these are the things that actually attract investors,” says El Hyani. “Not a high-speed train.” On Transparency International’s 2017 Corruption Perceptions Index, which ranks countries on their perceived levels of impropriety, Morocco ranked 81st out of 180. According to a diplomatic cable from the US embassy in Rabat, “corruption is prevalent at all levels of Moroccan society”.

The railway is meant to distract foreign investors from exactly this kind of issue. And yet, such corruption plagues the development strategies of many African countries, where dazzling infrastructure is implemented in lieu of real reform.

The most recent project to raise concern is Kenya’s new Chinese-backed railway, which became engulfed in controversy over its construction costs shortly after opening in May 2017. The line lost approximately $100m in its first operating year, and in August, 17 people connected with the project, including two senior government officials, were charged with fraud.

The concourse at Mombasa SGR Terminus station in Kenya. Photograph: Bloomberg/Bloomberg via Getty Images

Despite these ongoing flaws in the model, big-ticket, foreign-built infrastructure is endorsed by the African Union’s Agenda 2063, a “framework for the socio-economic transformation of the continent”. Adopted in Addis Ababa in 2015, one of its goals is a sprawling, integrated high-speed rail network that would ultimately “connect all the cities/capitals on the continent”. This goal was included shortly after a visit to Addis Ababa by Chinese Premier Li Keqiang, China’s official pitchman for that country’s high-speed rail industry. Given China’s multiplying interests in Africa – with enterprises that include several Chinese-built railways – Beijing no doubt sees the continent as a fertile market for its bullet train exports.

Whether such a network would actually benefit Africa remains unclear. Infrastructure funding is finite, a point that Morocco’s Stop TGV coalition tried to convey. The group estimates that for every ten metres of high-speed track Morocco has built, the government could have paid for a much-needed rural school instead. “There have always been two Moroccos,” says Benhamou. With the high-speed railway, the government has signalled its belief that resources poured into the first Morocco will trickle down to the second, a notion Benhamou finds hard to accept.

“Until recently, Morocco had only one highway. It linked Casablanca and Rabat,” he says. “Then Morocco started building lots of highways, cutting travel times between cities. The problem is, there were lots of smaller places between these cities that the new highways bypassed, and they withered because no one stopped at them any more. So no, I don’t buy the trickle-down effect.”