AP PHOTOS: From rich areas to the slums, soccer fields abound in Rio de Janeiro

In this Tuesday, June 3, 2014 photo, kids play soccer at the Cantagalo slum in Rio de Janeiro, Brazil. Rio de Janeiro might be best known for its white sandy beaches and dramatic rocky outcroppings, but soccer pitches are just as ubiquitous a part of the World Cup city’s landscape. The Two Brothers Mountain and Ipanema neighborhood are seen at top left. (AP Photo/Felipe Dana) (The Associated Press)

In this Sunday, June 1, 2014 photo, youth play soccer in the Sao Carlos slum in Rio de Janeiro, Brazil. Whether professional-grade or improvised, in high-rent neighborhoods or tucked into “favela” hillside slums, soccer fields are literally everywhere throughout this chaotic metropolis of 12 million. (AP Photo/Felipe Dana) (The Associated Press)

Soccer fields are everywhere in Rio de Janeiro. Whether professional-grade expanses of grass or improvised rectangles of dirt and rocks, they're found in high-rent neighborhoods and tucked into "favela" hillside slums of this chaotic city of 12 million people that is one of the World Cup host cities.

In the slums, soccer is not only a favorite pastime but is seen as a way of helping keep kids out of the clutches of drug gangs. City- or charity-run "escolinhas," or soccer schools, operate in nearly all of the slums, from the Dona Marta shantytown ensconced in the middle-class Botafogo neighborhood to Mangueira, a historic favela overlooking mythical Maracana Stadium, where six World Cup matches plus the final are to be held.

Between the kids' soccer schools and the adults who cap off their workdays with a "pelada," or informal match, competition for fields is stiff, particularly in the late afternoons and evenings.

In Aterro do Flamengo, a sprawling park near Sugarloaf Mountain, towering streetlights illuminate much disputed fields where matches take place all through the night and into the wee hours, often at 2, 3 or 4 a.m.

A proper field is a real luxury that most of Rio's soccer fanatics have to do without, playing anywhere they can find a sufficiently large, flat surface.

In the Pavaozinho slum, sandwiched between two of Brazil's most expensive neighborhoods, Copacabana and Ipanema beaches, barefoot kids take over the concrete of an irregularly shaped passageway. Similar scenes play out in the nearby Cantagalo slum, where boys hone their skills on a sliver of concrete in the shadow of Ipanema beach's iconic Dois Irmaos rock formation.

Beaches, mountains and soccer fields — that's Rio.