RIO DE JANEIRO — The hope that Olympic security fears might prove overblown were shattered in spectacular fashion on the eve of the Games when a man claiming to be a Russian diplomat shot dead a carjacker on a busy street close to the Olympic park.

Tackling the violence that mars one of the world’s most beautiful cities was one of the legacies that the 2016 Olympic organizers pledged to bequeath to Rio’s residents. Like almost every other legacy pledge, organizers and the state government have fallen well short of what they promised.

Crime is not confined to the mean streets of Rio, there have been reports of cash and equipment stolen from right inside the Olympic village. A Filipina journalist said thieves had bypassed the biometric locks on her media village accommodation and stolen money, while some members of the British Olympic team have reportedly banned cleaning staff from entering their rooms after kitbags containing competition swimwear went missing.

The road that leads from central Rio to the athletes’ villages and main Olympic hub to the west of the city is a near-permanent crush of traffic exacerbated by dedicated Olympic lanes and a new “rapid” bus service. In the midst of that traffic on Thursday, local media reported that two men on motorcycles attempted to rob a family at gunpoint.

Marcos Cesar Feres Braga, 60, a lawyer who said he’s Brazilian but also a Russian vice consul in Rio, was with his wife and daughter. When the thieves reportedly smashed the window of his car to try to steal his watch, Braga, who is trained in jiu-jitsu, grabbed the weapon from his attacker and shot him dead on the spot.

The robber’s body lay at the side of the road for five hours as Rio’s overworked homicide division investigated the crime scene. A Russian embassy spokesman denied that a member of staff had been involved, but photographs of the scene appeared to confirm that a fatal incident had taken place on the road to the main Olympic venues.

Police in Rio apparently told local reporters that the man was Russia’s vice consul, but Folha de Sao Paulo, Brazil’s largest newspaper, reported that Braga was using false papers and pretending to be a member of staff at the Russian consulate.

The deadly shooting one day before the Opening Ceremony, would be exactly the sort of high-profile outbreak of violence that Brazilian officials have dreaded as the eyes of the world settled on Rio.

Uneven attempts to “pacify” the most violent sections of Rio’s population have come to symbolize the difficulty in meeting the legacy goals outlined when Rio bid to host the games last decade.

In 2009, when Brazil was awarded the Olympics, the country’s economy was booming and a mood of optimism persuaded Brazilians to believe the unlikely pledges that hosting the World Cup in 2014 and the Olympics this summer would prove to be the catalyst for Brazil to be transformed.

With the Opening Ceremony just hours away, those dreams are in tatters.

On Thursday night, the rhythmic clank, clank, clank of a hammer rang out across the iconic Copacabana beach.

Construction was still underway on the beach volleyball arena. Three men—two of whom were wearing hard hats—were working into the night amid the tangle of rusted metal scaffolding that makes up the temporary arena.

Four languid members of the Australian women’s team towered above the men as they passed along the half-finished walkway after a final warm up on the Olympic volleyball court. They had none of the protection the construction workers were enjoying.

Despite the last-minute work, the arena will be finished on time. Perhaps not to the standards that were originally envisioned but it will be just enough to get by.

That has become a common refrain across the Olympic projects: just enough to get by.

Like the beach volleyball arena on the Copacabana, however, the foundations for many of the projects seem to be built on sand.

Is the promised comprehensive overhaul of the city’s transport infrastructure ready? No, not really. But they’ve done just enough to get by.

Bus projects and subway extensions that would help the whole city, including the poorest districts, have not materialized. Instead we have Linha 4—a new line on the metro system that links Copacabana and Ipanema with the Barra da Tijuca. Rio’s first new subway line in 30 years was supposed to stretch much farther but it was cut back amid delays and overspends.

It was scheduled to open to the public last year, but didn’t begin running until last Saturday and even then it is only for Olympic athletes, officials, and people with tickets for the Games. It will close again after the Paralympics to be finished off and apparently to undergo full safety checks, which raises the question of exactly how safe it is for the duration of the Games.

Cynical “Cariocas” (residents of Rio) have noticed that the new line will go far enough to benefit the wealthy property developers in Barra da Tijuca but not far enough to connect ordinary workers with the bus network that takes them home.

Still, it should be just enough to get by.

One of the venues which has attracted the most scrutiny and concern in the buildup to the Games is the sailing facility at the Marina da Glória. Guanabara Bay, where it is found east of Copacabana, is polluted with the raw sewage from many of the city’s favelas.

Torrents of human feces, a fridge, and even a dead body are among the unwelcome items to be spotted floating in the water in the weeks before sailors and windsurfers will compete.

Cleaning up the bay was another legacy pledge, but it has been long-since abandoned.

Willie McBride, coach of the U.S. women’s skiff team, was in the boat yard making final adjustments to the competition boat on Thursday night.

He said the sailing team had been making repeated trips to the bay since 2012 and they were there every month this year. He hasn’t seen much evidence of the supposed rush to improve the conditions. “There have been these eco-boats out in the water to clean up but I have never seen one in action,” he said.

McBride said the U.S. team were taking special measures like carrying antibacterial wash on the boats, but he said he didn’t know of a single U.S. sailor that had been forced to miss training due to illness in all the months of sailing in Guanabara Bay.

“It’s one of those sports where you roll with the punches,” he said.

Competitive sailors are used to getting by.