A dilapidated shed on a potholed road in the heart of Mexico’s Unesco-protected Calakmul biosphere is an unlikely war room.

But it is from here that the Regional Indigenous and Popular Council of Xpujil (Cripx), a local NGO, has launched a legal battle to stop President Andrés Manuel López Obrador’s $7.8bn Maya Train project in its tracks.

Cripx and local farmers are worried about the environmental impact of running diesel engines through the habitat of endangered jaguars in a landscape studded with archaeological treasures. They are facing off against a powerful adversary: the military.

The government has awarded construction contracts for several stretches of the 1,500-km route — including the one through the lush Calakmul biosphere, which is home to the majestic ruins of the same name — to the defence ministry. This month it announced that once complete, the entire Maya Train would belong to the army.

Cristopher Herrera Sarmiento, 35, a vet, discusses the Maya Train with other townspeople in Escárcega, Mexico this month. Like them, his business lies in the path of the train.

“They know that if they’d awarded the stretch here to a private company it would be easy to organise resistance,” said Jesús López Zapata, one of Cripx’s founders, speaking in the shade of a tree behind the tiny office.

“But not when it’s the army. “We are talking about a confrontation. We don’t want things to get to that point, but if push comes to shove, we’ll have no choice.”

More than a dozen injunctions against the train are making their way through the courts but López Obrador is not easily derailed. He has pledged to visit the project every fortnight if needed to ensure the flagship development and infrastructure project will be finished before he leaves office in 2024, and refuses to believe legal challenges could thwart his plans.

But with court rulings pending, work so far has been confined to tearing up the tracks of an old railway that exist on part of the planned route. New rails will be laid capable of carrying trains running at up to 160km/hour to connect some of the country’s best-known tourist resorts and Maya ruins.

Maya Train workers rip up old rails in the community of La Chiquita in south-east Mexico on March 1.

López Obrador says the project will offer tourist, local and cargo services and bring development to the poor south-east where he grew up — a region historically overlooked by Mexican leaders.

But the project is divisive. “I’m a life-long railway man and I would like nothing more than to see passenger railways reborn in Mexico . . . However, from the start, I’ve never thought the Maya Train was a good idea,” Francisco Javier Gorostiza Pérez, a former train boss and ex-government official, told Mexico’s College of Civil Engineers recently.

He said the Maya Train’s expectations of reaching 50,000 passengers a day and 18m a year were pie in the sky — such a figure would be almost as much as China’s Beijing-Shanghai high-speed railway, which attracts 20m passengers annually, and nearly double the Eurostar’s 10.4m, he said.

Compared with other tourist trains, the projected passenger figure would be 12 times that of Peru’s Cusco-Machu Picchu service and would far outstrip the 250,000 a year who ride the Swiss Glacier Express, or the 200,000 people travelling on El Chepe through Mexico’s Copper Canyons, the country’s sole surviving passenger service, he added.

lemencia de la Cruz Castellana, 54, and her husband Isaías Vásquez Sánchez, 56, outside the abandoned train station where they are squatting in Escárcega, south-east Mexico, on March 1.

Gorostiza Pérez said the plans needed to be revised and warned that the cost was likely to balloon by 50 per cent.

As for the Maya Train’s impact on some of the world’s most biodiverse regions, he said: “Running high speed trains through biosphere and jungle zones would be a true ecological crime.”

Mexico’s state auditor’s office has also warned about cost overruns, dubious profitability, insufficient consultations with local communities and environmental damage.

But many locals are behind the project. “It was hard for us to take the legal action because lots of people see López Obrador as a saviour and this project as manna from heaven,” acknowledged López Zapata at Cripx.

For Isaías Vásquez Sánchez, employed for 43 years on Mexican railways, “the train will bring back glory”. He has been squatting in the abandoned station at Escárcega, a scruffy traditional rail hub where three Maya Train routes will intersect, since losing his job last August when cargo services stopped so that work on the project could start.

“I hope they’ll give me a job,” he said, leaning on the barbed wire fencing off the future construction site. His wife, Clemencia de la Cruz, is proud to work as a cleaner with the train project. “I’ve never been on a passenger train,” she said. “There are lots of poor people here who will be helped.”

Many shopkeepers in Escárcega also like the prospect. What they object to is the route.

Yosulia Gamboa, whose father was a train worker and mayor of Escárcega, faces a double whammy. The proposed 20m right of way on each side of the track will require buildings to be knocked down and “I’m affected on both sides — on one side is my house and on the other, my clothes shop,” she said.

Jerónima López Hernández (R), 34, a bee-keeper, and her husband, Germán Bartolo Barrios (L), 52, attend to their hives deep in the forest outside the village of Nueva Vida in the Unesco-protected Calakmul biosphere in Campeche, south-east Mexico, on March 2.

Maya Train officials say they are in negotiations with residents and that expropriation of land for the train is a last resort they hope to avoid.

Meanwhile, Alejandro Varela, head of legal affairs at Fonatur, the state agency in charge of the Maya Train, said injunctions could not stop them from modernising the lines and despite multiplying legal challenges to the project “we are sure we will win”.

Around Calakmul, however, some local farmers feel their compliance has been bought. Almost everyone is a beneficiary of López Obrador’s tree planting programme, Sowing Life, because it pays an attractive 4,500 pesos ($220) a month.

Like many locals, Germán Bartolo Barrios chopped down the mature, existing trees on the land that he and his wife rent inside the biosphere and replanted it with the scheme’s saplings. “I think Amlo thinks Sowing Life is in exchange for support for the Maya Train,” said his wife, Jerónima López Hernández.

An indigenous Tzeltal beekeeper, she is in the process of securing organic certification for the honey she produces in the middle of the jungle and fears “the train will cause a lot of pollution — a lot”.

Even some tourists were unconvinced. “I wouldn’t take it. It’ll be a natural disaster, I don’t think it’s necessary,” said Iván Paredes, a 43-year-old survival instructor from Barcelona, as he ate his lunch amid the peaceful Xpuhil ruins.

Many fear the train will end up a white elephant. “It’s such a waste of money,” complained one businessman who lives in a state where the train will pass. “I can’t believe we can’t stop it.”