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.

Rio 2016 Olympics
People walk past the beach volleyball area, under construction on Copacabana beachMario Tama/Getty Images
Rio 2016 Olympic favela
A resident walks up a hill in the Mangueira favela, with the Maracana stadium in the backgroundMario Tama/Getty Images

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 2016 Olympics
A young resident stands in an occupied building in the Mangueira favelaMario Tama/Getty Images
Rio 2016 Olympic favela
A boy walks home from school dragging his backpack in the Mangueira favelaMario Tama/Getty Images
Rio 2016 Olympic favela
People celebrate at a party held by the Mangueira samba schoolMario Tama/Getty Images
Rio 2016 Olympic favela
A woman carries her child past piles of rubbish inside a building in the Mangueira favelaMario Tama/Getty Images
Rio 2016 Olympic favela
A man receives a haircut in the mostly demolished Metro-Mangueira favelaMario Tama/Getty Images
Rio 2016 Olympic favela
Raw sewage drains from an occupied building in the Mangueira favelaMario Tama/Getty Images
Rio 2016 Olympic favela
Workers pose at a party held by the Mangueira samba schoolMario Tama/Getty Images
Rio 2016 Olympic favela
Clothes hang in the mostly demolished Metro-Mangueira favelaMario Tama/Getty Images
Rio 2016 Olympic favela
Hairdressing student Darlen Silva waits for her bus after classes in the Mangueira favelaMario Tama/Getty Images
Rio 2016 Olympic favela
A young resident rollerblades in an occupied building in the Mangueira favelaMario Tama/Getty Images
Rio 2016 Olympic favela
Children play in an apartment in an occupied building in the Mangueira favelaMario Tama/Getty Images
Rio 2016 Olympic favela
A man enters his home, decorated with graffiti reading 'We are human beings' in the mostly demolished Metro-Mangueira favelaMario Tama/Getty Images
Rio 2016 Olympic favela
A man enters his makeshift apartment in the mostly demolished Metro-Mangueira favela in Rio de JaneiroMario Tama/Getty Images
Rio 2016 Olympic favela
People sit in an abandoned building in the Mangueira favelaMario Tama/Getty Images
Rio 2016 Olympic favela
Kids play in an occupied building in the Mangueira favela, near bottles of water collected by residents from a hoseMario Tama/Getty Images
Rio 2016 Olympic favela
People gather around a small fire on a cold evening in the mostly demolished Metro-Mangueira favelaMario Tama/Getty Images
Rio 2016 Olympic favela
A woman walks past an occupied building in the Mangueira favelaMario Tama/Getty Images
Rio 2016 Olympic favela
Residents burn rubbish uncollected by the local government in the Mangueira favela, with the Maracana stadium in the backgroundMario Tama/Getty Images

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.

Rio 2016 Olympics
A man does a backflip on Copacabana beach at sunsetMario Tama/Getty Images
Rio 2016 Olympics
A worker sits on scaffolding at the official Olympics megastore on Copacabana beachMario Tama/Getty Images
Rio 2016 Olympics
Men play footvolley, a mixture of soccer and volleyball, in front of the official Olympics megastore on Copacabana beachMario Tama/Getty Images
Rio 2016 Olympics
People shop for souvenirs at the official Olympics megastore on Copacabana beachMario Tama/Getty Images
Rio 2016 Olympics
Workers drape a billboard advertisement for an Olympic sponsor on the side of a building in RioMario Tama/Getty Images
Rio 2016 Olympics
Contruction continues at the Olympic Park in the Barra da Tijuca neighbourhoodMario Tama/Getty Images
Rio 2016 Olympics
The Athletes' Village for the Rio 2016 Olympic Games in the Barra de Tijuca neighbourhood, next to the polluted Jacarepagua lagoonMario Tama/Getty Images
Rio 2016 Olympics
Visitors gather beneath the Christ the Redeemer statue on Corcovado mountain, with the Maracana stadium, site of the Olympic opening ceremonies, in the backgroundMario Tama/Getty Images
Rio 2016 Olympics
An aerial view of Ipanema beach (left), Arpoador rock and Copacabana BeachMario Tama/Getty Images
Rio 2016 Olympics
A polluted waterway flows in the Barra de Tijuca neighbourhood, not far from the Olympic ParkMario Tama/Getty Images
Rio 2016 Olympics
Rubbish floats in the polluted Rodrigo de Freitas Lagoon, venue for the rowing events at the Rio 2016 Olympic GameMario Tama/Getty Images
Rio 2016 Olympics
Children look at a body part, covered in a plastic bag, which was discovered on Copacabana Beach near the Olympic beach volleyball venue on 29 June 2016Mario Tama/Getty Images
Rio 2016 Olympics
Construction continues on the cable-stayed bridge which will carry the new Metro Line 4 subway line into the Barra da Tijuca neighbourhoodMario Tama/Getty Images
Rio 2016 Olympics
A homeless woman named Vanessa lies on a street where construction of a new light rail system has been delayedMario Tama/Getty Images
Rio 2016 Olympics
A boy walks along a dilapidated street where construction of a new rail system has been delayedMario Tama/Getty Images

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.