When you're a director, there are some movies that you want to make. There are other movies that you have to make. I made Gangs of New York because I had to.

I became fascinated with the world of Manhattan's Five Points when I first heard its legends as a child.

And in 1970, while staying at a friend's house on Long Island, I came across Herbert Asbury's book The Gangs of New York.

Lured by its title, I picked up the book and read it in one sitting. The stories of gangs with such wonderful names as Dead Rabbits and Plug Uglies and the way they operated -- and gangsters like Bill the Butcher or Monk Eastman -- fascinated me.

Add to this the Civil War erupting and the ensuing New York Draft Riots of 1863 and I had a great subject for a movie.

As I reread Asbury's book and the original sources on which his account was based, I remembered the stories I'd heard growing up in Little Italy -- local legends that had been told on the streets and embellished over the years.

One involved my family's church, St. Patrick's Old Cathedral on Mott Street. Behind it is one of New York City's first Catholic graveyards. I shot there for Mean Streets.

In 1844, the Irish immigrants banded together and defended the church against an angry mob of anti-Catholic Anglo-Americans. The Irish brought their women and children to the showdown and the mob backed down.

I was amazed when I read up on the Draft Riots, one of the least-discussed events in American history. When I was at school, we were taught that the Civil War was something that happened in the South, and the North banded together to "preserve the union." But the war reached New York.

The poor who were crammed into the lower half of Manhattan were among those who were drafted into the army, who couldn't afford the $300 it cost to buy their way out.

So they revolted. Thousands of people, many of them African-Americans, were injured and killed. Stores were looted, houses were burned down. The city practically burned to the ground before the troops, fresh from Gettysburg, came in to quell the riot.

This was one of the pivotal moments in American history, a time when our notion of democracy was really put to the test. Afterwards, everyone had to find a way of living together.

The city and the nation had to make room for the immigrants who fled the potato famine in Ireland, for the newly emancipated African-Americans, and for all those who would arrive by the boatload from all over the world.

Before long, I started to imagine characters, to compose shots and sequences in my head. My friend Jay Cocks started working on the script. And in 1977, with producer Alberto Grimaldi, we took out an ad in Variety announcing the movie.

Getting it made proved more difficult. Large sets would have to be built, since nothing of this part of New York of the 1850s and 1860s exists today. It would be a costly venture.

Finessing the script was just as daunting. We had to create a personal story and convey the importance of all the different factors -- political, economic and ethnic -- that together made New York a powder keg ready to explode.

Corruption was rampant in the Five Points. There were rival police forces and rival privately run fire companies. New York was like a collection of rival tribes, fighting for prominence.

The upper class was also a tribe, but one that lived above the fray -- literally, since New York was historically built up from south to north, and the rich moved uptown as the city grew.

The street gangs of the 19th century built up poli tical muscle by trading their votes to corrupt political organizations, most prominently Tammany Hall, the great Irish political machine. In writing the script, we had to find a way of fitting all these elements into our story without turning it into a documentary.

I felt that the movie had to be an epic, like the films I'd loved as a child. So we decided to go with a traditional conflict -- revenge -- and created the characters as variations of the hero, the villain and the girl.

In 1989, I had just finished Goodfellas and was on my way to Japan to play a small part in Kurosawa's Dreams. During the trip, I read the script of Gangs and felt the relationship between the "hero" and "villain" should be more complex.

Jay went back to work and by 1993 had completed a new draft which incorporated the idea of the villain being a surrogate father to the hero. By then I was involved in making other movies and the script lay dormant.

In 1999, Michael Ovitz, my former agent, came to visit me on the set of Bringing Out the Dead. He asked me what I was thinking of doing next. I had a couple of projects in development, but Mike suggested: "How about Gangs of New York?"

He had formed a new management company with Leonardo DiCaprio as a client, whom we agreed would be perfect to play Amsterdam, the hero. So a deal was made at Disney with Joe Roth, and when he left the company, it was taken up by Harvey Weinstein at Miramax, with Graham King of IEG for the foreign rights.

Harvey and Dante Ferretti, our brilliant production designer, made a good deal for us at Cinecitta, the legendary studio outside of Rome, where epics such as Ben-Hur and Cleopatra and Fellini's masterpieces were made.

Construction began in the spring of 2000. We built 11/2 miles of mid-19th century lower Manhattan, including the port of New York with two life-size movable ship hulls.

Before I knew it, the movie was cast: DiCaprio, Daniel Day-Lewis and Cameron Diaz in the leads with an extraordinary supporting cast that included Jim Broadbent, Henry Thomas, John C. Reilly, Brendan Gleeson and Liam Neeson. Sandy Powell designed the costumes.

That August, I found myself in disbelief after so many years of planning, standing not in Rome but in New York's most notorious slum.

Our biggest interior sets were constructed in Stage 5, where Fellini made many of his films. These sets included Satan's Circus (named after a real joint of the 1870s); the hangout for Daniel Day-Lewis' Bill the Butcher and his Native Americans; Sparrow's Chinese Pagoda (the inside of which we modeled on the gambling den in von Sternberg's Shanghai Gesture); the Old Brewery (eventually turned into the Five Points Mission); and St. Thomas Church (modeled after St. Patrick's Old Cathedral), whose exteriors circled Paradise Square.

There was also a Broadway area that included the Barnum Museum, Apollo Hall, the Metamora Hose Company, Delmonico's, the Metropolitan Police Station, the Herald Tribune and Tammany Hall. Along the port was a fish market and Sportsman's Hall.

It was an incredible experience for all of us working on this movie. The Five Points became our home and we lived the lives of the characters I had thought about for so many years.

When people ask me what it was like living in Rome, I always laugh.

"You see," I answer, "I was living in New York."