ON THE outskirts of Rio de Janeiro is a trapdoor to Hell: a ghetto called Cidade de Deus (City of God), where drug-dealing teenagers kill one another with mesmerizing abandon. Left alone by the police and completely ignored by Brazilian society, the City of God lives by its own rules, trading on marijuana, cocaine, murder and bloody legend.

"City of God," Fernando Meirelles' lightning bolt of a movie, charts three decades in that hell, where such colorfully named characters as Li'l Dice, Stringy, Melonhead and Steak & Fries grow up shooting their way to misperceived glory.

Unfolding with the narrative virtuosity of Martin Scorsese's "GoodFellas" and "Casino," with a little "Pulp Fiction" thrown in, the movie shows the evolution of that favela (slum) from a depressing housing district full of petty robbers in the late 1960s to an increasingly dangerous society of drug dealers and gangsters during the 1970s and 1980s.

Using non-actors to play the majority of roles, Meirelles has created one of the most startling, grittily brilliant films in recent years.

Not everyone's a shooter or drug dealer, of course. For instance, Rocket (Alexandre Rodrigues), who takes a few half-hearted stabs at robbery, dreams of becoming a photographer.

A kid who has grown up in this favela and doesn't leave until his late teens, he is witness to many things. As the movie's narrator, he tells us of the impulsive robberies of his brother Goose (Renato de Souza) in the late 1960s; a brutal episode in which a cuckolded husband exacts horrifying revenge on his wife; and the disturbing evolution of a kid named Li'l Dice (Douglas Silva), who grows older, changes his name to Li'l Ze (now played by Leandro Firmino da Hora) and becomes the city's most notorious killer and druglord.

But the movie's not all doom and boom. There are some moments of passing humor. When Rocket and a friend toy with robbing a bakery, for instance, they change their plans when the young girl behind the counter starts flirting with them. They also abandon the holdup of a bus because they think the bus driver, Knockout Ned (Seu Jorge), is so cool. What terrible hoods they are!

But in this marvelously connected thread of a story, based on Paulo Lins's 700-page 352-character novel, Ned has far more significance than Rocket imagines.

When Li'l Ze rapes Ned's girlfriend, the driver joins forces with a rival gang run by Carrot (Matheus Nachtergaele) to take his moral vengeance. It's the beginning of a fight for street justice over evil. And Rocket will be right at the climactic center.

Meirelles, co-director Katia Lund and screenwriter Braulio Mantovani have created an extraordinary film that twists and turns through time, constantly touching on themes and characters and returning to those pivotal components later.

This is truly a storytelling movie. And it's a cinematic spectacle, too: a digitally shot film with "Matrix"-style camera circulations, sped-up motion, jump-cut editing and a richly eclectic sound track (from samba to disco).

Meirelles and Lund spent months casting, training and rehearsing their performers -- mostly amateur teenagers who came from Cidade de Deus and other favelas. The young actors were encouraged to explore their characters and dialogue through improvisation; the best results were then incorporated by screenwriter Mantovani into the shooting script.

The result: amazingly authentic, fluid performances, particularly from da Hora as Li'l Ze. You're not only blown away by the drama but the quasi-documentary presence of the people in it. This is a world you enter and fully experience. And in a sense, it's a place you never really leave.

CITY OF GOD (R, 130 minutes) -- Contains disturbing violence, drug content, obscene language, nudity and sexual scenes. In Portuguese with subtitles. At Landmark Theatres Bethesda Row and the Cineplex Odeon Outer Circle.

Rocket (Alexandre Rodrigues) dreams of shooting pictures, not people, in the heartbreaking "City of God."