With less than a month to go until the Olympic Games opening ceremony, Rio de Janeiro is a city divided. The games venues are mostly situated in the wealthy areas south and west of the city. Rio's northern favelas, the city's infamous slums, will get little benefit from the upgraded infrastructure.

Copacabana beach is an Olympic construction site. The beach volleyball venue is going up, broadcast studios rise on scaffolding above the sand and a mammoth tent is jammed with thousands of pricey souvenirs.

However, promises that hosting the games would revitalise even Rio's most deprived neighbourhoods have been eclipsed by a multitude of problems: security threats, soaring violence, the Zika virus, slow ticket sales and water pollution. A bike lane, suspended high above the sea and built as an Olympic legacy project, collapsed in April and killed two people.

More than 20% of Rio de Janeiro's 6.5 million residents live in favelas, which often lack proper sanitation, health care, education and security due to gang and police violence. The city's poorest people are being hit by Brazil's worst recession since the 1930s, soaring crime and unemployment over 10%. The Morar Carioca plan to urbanise Rio's favelas by 2020 was one of the key social legacy projects heralded ahead of the Rio 2016 Olympic Games. The plan has mostly failed to materialise.

In this IBTimes UK gallery, Getty Images photographer Mario Tama documents Rio de Janeiro, a tale of two very different cities.

Rio's organisers have budgeted about £1.5 billion ($2bn) for operations. In addition, another £7.5bn - £9bn in public and private money is being spent on urban transportation projects driven by the Olympics. Rio has installed new high-speed buses and a light-rail system to serve downtown. And there's a still-unfinished £2bn underground railway line extension to connect the upscale Copacabana and Ipanema beach areas with the western suburb of Barra da Tijuca — site of the Olympic Park. It's unclear if the subway line will be running when the games open on 5 August.

Brazilians are wary of public-works projects, which typically produce only embezzlement and empty promises. "Where I live, we don't see changes like these," Julia Alves, an 18-year-old student speaking in the city's renovated port area, told The Associated Press. "They are things for foreigners," she added.

IOC member Carlos Nuzman, the president of the organising committee, has repeatedly claimed: "Rio will be the Olympic city with the greatest transformation." He said residents "are the ones who will get the most from the games".

About 10,500 athletes and up to 500,000 foreign visitors are expected for the games. Gustavo Nascimento, Rio's venue management director, promises everything will be ready in time for the games, but he added that ticket sales are slow. "There are still tickets available, very, very high-quality tickets," he said.