Deep under the streets of Rio de Janeiro, just a few blocks away from Ipanema’s famed beaches, construction crews are working around the clock to complete a new subway extension critical to the success of next year’s Olympic Games.

The deadline to finish the ambitious 16-kilometer (10-mile) extension is July 1, and with the games scheduled to kick off Aug. 5, there’s scant room for error. Yet the obstacles are daunting. The biggest is the technical challenges of burrowing through mountains. Beyond that, there’s Brazil’s uninspiring track record of snafus and delays in readying stadiums for last year’s World Cup.

The country’s massive corruption scandal that has entangled, among others, the company in charge of the metro project hasn’t helped. Add it all up, and the race to finish the subway ahead of the Olympic Games has become a sort of high- pressure test case of a troubled Brazil’s ability to function as a global player on the world stage.

“It’s a very tight schedule, a great challenge,”  said Carlos Osorio, Rio state’s secretary of transport, the man in charge of the $2.3 billion project and one of the leaders of Rio’s surprise winning bid in 2009 to host the games. “But we are very certain we will be on time.” Just for good measure, though, Osorio keeps near his desk a replica of Nossa Senhora Aparecida, a revered Brazilian statue of the Virgin Mary.

Casting a shadow over the subway project is the corruption case involving Brazil’s biggest construction companies and the arrest in June of Marcelo Odebrecht, chief executive officer of the company leading the subway works. His detention sent shock waves through the business community. Federal police have charged some of Brazil’s most senior politicians and business leaders with participating in a vast kickback scheme that has hurt the economy and raised calls for the impeachment of President Dilma Rousseff.

The subway project has not been implicated in any of the scandals and is not a subject of investigation.

The metro line, known as Linha 4, is planned to connect the tourist centers of the south zone of Rio with Barra, the western neighborhood hosting the Olympic Park. Beyond serving the Olympics, the project’s longer term goals are to reduce car traffic and connect outlying neighborhoods to Rio’s downtown. Just five weeks after its scheduled completion date, the line will become essential to the smooth ferrying many thousands of visitors to Olympic events. If it’s not ready, Rio will face monstrous traffic jams along its twisting, mountainous coastal roads and the potential of empty seats in its shiny new stadiums.

Warning Signs

There are warning signs that not all is on track. In July, a tribunal that oversees state government spending, said the subway was at “high risk” of not being ready for the games. The warning from Rio’s audit court was based on an investigation through Dec. 2014. Several months earlier, two large craters appeared in the middle of an affluent neighborhood as workers bored tunnels beneath the ground. The results of a second audit will be released at the end of the year.

Osorio said the initial setbacks have been overcome and that the project is meeting its weekly progress targets. Still, Brazil has a history of missing deadlines and blowing out budgets on other big construction projects, including most of the 12 stadiums built or refurbished for last year’s World Cup.

Test Trains

Test train runs are scheduled to start in March after tunnel excavation concludes by late December. To hit that mark, heavy machinery, including a giant mobile crane moving materials around, are going full blast, 24 hours a day, six days away week.

Sidney Levy, CEO of the Brazil 2016 Olympic Organizing Committee, said the subway’s completion is “critical” to the success of the games. A statement issued by the committee declared it had received “indications” that “all milestones” related to the critical phases of the work had been met.

Still, the committee is making contingency plans. It has talked to the city about a work-around solution of filling the streets with buses in case the subway project hits a snag. It’s not an ideal solution, Levy said, and would be “very heavy on traffic.”

Necessary Tests

Even if construction is completed on time, it’s unlikely that the line will be fully operational next year considering all the necessary tests that need completion, said Marcus Quintella, an engineer and professor at the the Getulio Vargas Foundation who has worked in designing metro lines in Rio and Sao Paulo.

“It will start in an limited way in terms of working hours and stations,” he said. “They won’t be transporting the as many as 300,000 passengers a day foreseen in the demand studies.”

Rio, a city blessed with breathtaking sea views and a dramatic topology, opened its first subway line in 1979, years behind other Latin American cities like Buenos Aires or Mexico City. Linha 4 was originally commissioned in 1998 but work only started in 2010 after Rio got federal funding for the project, thanks to its hosting the Olympics. To deliver the metro on time for the games, engineers have scaled back the project to the original design by delaying the opening of one of the stations along the route to early 2017 and postponing a connection to another line until after the games.

“We opted to do what’s more logical with the time we have,” Osorio said. “The Olympic Games were the biggest excuse Rio de Janeiro got in its 450 years. It’s a catalyst project for sports and resources.”

Fernando MacDowell, a professor at Rio’s PUC University who led the project to install the city’s first metro system in late 1970s, says the original vision of the subway has been scaled back to get it running in time for the games.

“In Brazil, everything that’s provisional becomes eternal,” he said. “That’s the only law that everybody respects.”

This article was written by Juan Pablo Spinetto and Tariq Panja from Bloomberg and was legally licensed through the NewsCred publisher network.

Photo Credit: Unfinished section of a Rio de Janeiro subway station. Metrô Linha 4