NEW YORK - It's the biggest public party in the country. Nearly a million revelers will cram into the streets of Times Square to watch the ball drop on New Year's Eve.

It's also remarkably crime-free, safe, and orderly. In the last decade, there have been few arrests and virtually no major problems funneling people in and out of the confetti-filled streets to ring in the New Year.

That's due mostly to what the partygoers don't notice: throngs of police and counterterrorism officers blanketing the area, working from a security plan specifically tailored for the event.

Manhole covers are sealed. Counter-snipers are stationed on secret rooftops. Officers carry beeper-sized radiation detectors. Plainclothes officers are stationed in the pens with the crowds, along with a uniformed presence and undercover officers. Bomb-sniffing dogs are on site. Purses are searched. Checkpoints are set up. Passing vehicles are checked for safety. Haz-mat teams are on standby.

The 20-inch snowstorm that left New York City streets far from Times Square unplowed will be a memory to the crowd. Crews have removed the large drifts, and warm temperatures are helping to melt what's left.

NYPD brass tweak the plan every year, using lessons learned from previous scares such as the botched Times Square car bombing in May. NYPD counterterrorism chief James Waters mined information on the recent suicide bombing in Stockholm, Sweden.

"Intelligence informs a lot of what we do," Waters said.

People have gathered for a century in Times Square to ring in the new year, but it hasn't always been a family-friendly affair.

In the early 1990s, before the redevelopment of the bowtie collection of streets at Broadway and Seventh Avenue, the area was overrun with crime and was home to sex shops and peep shows.

Revelers would gather with plenty of liquor as shopkeepers boarded up their windows with plywood for the night, hoping no one would smash through. Dick Clark broadcast his ABC show from the area, but he did it inside, away from the crowds.

Longtime residents say it was a boozy, drunken mess.

"In the 1990s, the police wouldn't even let us play music on an outdoor sound system," said Tim Tompkins, president of the Times Square Alliance, which runs the event along with Countdown Entertainment. "They were afraid to draw any more people, because it was wild."

But Disney, upscale hotels, theme stores, and restaurants arrived in the mid-1990s and changed the feel of the area, drawing more families and tourists, and with them, a softer crowd.

Police began to ramp up their security effort with worries over millennium threats.

Officers used metal pens to control where the crowd stood - keeping a path clear for emergency trucks. They banned alcohol and backpacks. Uniformed police flooded the area. Plainclothes officers roamed the crowds.

After Sept. 11, 2001, "we added a counterterrorism overlay" to New Year's security, said Paul Browne, the NYPD's deputy commissioner for public information. "We have kept changing it based on the needs ever since."

The department has answered with ever-developing tools, such as a network of private and police cameras. It recently added 500 cameras to the subway stops at Times Square, Grand Central Terminal, and Penn Station.

The cameras are managed at a command center in Lower Manhattan, where a fiber-optic network connects them to police. It will be used New Year's Eve to help track any suspicious activity.

The department meets months in advance to set rules and share plans with area restaurants and hotels, along with the Times Square Alliance. They plot out where TV trucks will be stationed, and the best exit routes in case of an emergency.

On the big day, garages in the area are swept for explosives. Police station officers on boats in New York Harbor and send more uniformed officers to every major transportation hub in the city. They monitor fireworks displays at the Statue of Liberty and Central and Prospect Parks.

After the clock strikes 12 and the Waterford crystal ball drops, the crowd disappears quickly. Sanitation workers start to clean up, and the NYPD starts planning for next year.