MIAMI -- The first time, said Rudy Arias, one of 10 Miami police officers who have pleaded guilty in a deadly drug-trafficking case, it was just a matter of opportunity: He kept the money he found in petty drug dealers' cars.

Opportunity kept knocking, and Arias, a much-decorated patrolman, kept answering. When he began keeping larger discoveries -- 5,000 pounds of marijuana, for instance -- he got help from police academy classmates, some of them fellow weight lifters and drinking buddies, on the night shift.

When Arias and his colleagues graduated to robbing boats and houses, they made millions of dollars selling hundreds of pounds of cocaine to the dealers who told them where to find it. By then, some were using nicknames such as "Scarface" and "Squeaky."

For a time, these $25,000-a-year police officers were spending lavishly on houses, cars, mistresses and blue-chip stocks. Something had gone so wrong that even after they were caught and put on trial, Arias and two other cops paid a hit man $100,000 in an attempt to have him kill a drug dealer who turned state's witness against them.

The end came six months after three of their victims drowned in July 1985 in the Miami River, and the resulting investigation widened to probes that over the last three years have implicated dozens of Miami cops in related and unrelated incidents. By fall, Miami Police Chief Clarence Dickson said, the subsequent "housecleaning" will have purged the department of about 100 officers, including about 20 suspensions or misdemeanor arrests yet to come.

Dickson's admission is staggering: that one-tenth of his sworn personnel became unfit cops. But what befell his department may have been a tragedy waiting to happen, one created in part by the city's efforts to make the department more responsive to an increasingly volatile community.

There was a lot of opportunity knocking around in the streets of Miami in the early 1980s. Every day seemed to bring another report of a young Colombian arrested in a Mercedes-Benz with a couple of kilograms of cocaine and a few hundred thousand dollars in the trunk.

A savage turf war among cocaine traffickers provided a daily litter of corpses. And that was just one of the developments that left a shell-shocked citizenry screaming for more police.

Another was that Cuban neighborhoods were becoming explosively overcrowded. The more than 100,000 refugees who packed into Miami from the Cuban port of Mariel in 1980 included many of the 15,000 from Cuba's prisons and mental hospitals. That May, a race riot ripped through the black Liberty City ghetto. Throughout the year, rickety boats packed with Haitian refugees kept washing up on area beaches.

No wonder, then, that the city commission voted late that year to nearly double the size of its police force over the next several years, finessing a long fight over how to hire and promote more Hispanic and black police officers in a city that was growing overwhelmingly Hispanic.

In the first two years, 200 new officers were hired, most of them Hispanic or black. In retrospect, Dickson said, who was then a major, the department expanded too quickly and failed to adequately supervise and train the new officers.

Rodolfo (Rudy) Arias was among the recruits. So were fully three-quarters of the officers since accused of wrongdoing or complicity. The vast majority of them are still under age 30.

Ten current or former officers, including Arias, have pleaded guilty to murder-conspiracy or drug trafficking charges and now face reduced sentences of up to 30 years in prison. After a six-week trial, jurors will resume their ninth day of deliberations Monday on the fate of two more officers in what has come to be called the "River Cops" case. Two others remain fugitives. Twenty-nine officers have been relieved of duty. Most of them, Dickson said, knew something they should have reported or investigate further when their suspicions were aroused. He has vowed to fire them all.

In numerous incidents unrelated to that group, the past three years have seen 37 other officers fired or forced out, sometimes after conviction on criminal charges, for reasons that include failing or refusing urinalysis for drug use; drug possession; rape; bribery, and perjury.

"Their backgrounds and history were really no different from guys who made good and stayed clean," Dickson said. "As far as I can see, they overwhelmed the system and became the masters of their own destiny."

The "system" all but collapsed as the rate of new hires soared in 1981 and 1982 to six and seven a week from just one.

They so outnumbered the veterans that officers with less than a year's experience had to be pressed into service as field-training officers to teach rookies the ropes on the streets and recommend whether they pass probation.

Some of the conditions for what happened to Arias and his friends were established as the rookies, a few of them friends since high school, continued to hang out in familiar Little Havana bars.

Some of the other regulars in those Little Havana haunts were drug dealers. Jutting southward toward South America, Florida's southern tip accounts year in and year out for 90 percent of the Coast Guard's drug confiscations nationwide and more than half of the Custom Service's. Spanish is the language of that covert commerce.

It is not clear how Arias and the others cut their first drug deals. But thereafter, the officers' friendships took precedence over their oaths to enforce the law.

Maybe it was a shared sense of daring and machismo. Many of them were high-profile, aggressive officers. They spent other leisure hours together building their physiques by lifting weights.

Maybe it had something to do with their common backgrounds as first-generation Cuban Americans, born in Cuba but reared since early childhood in the United States. All of them came from lower-middle-class families for which becoming a police officer was a step up in prestige and pay.

What is clear is that no one was watching as their ambition transmogrified into greed and they careened down a path to lawlessness.

"When you're on the line offering your life for $25,000 a year and you see those cocaine cowboys getting off on light sentences and getting off on probation, it becomes opportunity for the employee who's a little weak-willed," said Dick Kinne, president of the Miami department's Fraternal Order of Police unit.

At their peak, some of the officers were spending $3,000 a day on average salaries of less than $500 a week. They bought houses for cash. One of the few who still denies wrongdoing was arrested for speeding in a fire-engine red Lotus roadster worth $59,000. Another treated friends to cases of Dom Perignon champagne at a disco. Two started portfolios of blue-chip stocks.

They had taken to breaking into the houses of drug dealers and stealing the drugs, cash and other valuables they found. The enormity of their crimes did not emerge until Arias, prodded by the priest for whom he had served as altar boy, confessed last May. That started a slow train of guilty pleas.

As a result of the scandals, Chief Dickson said, the department now teaches ethics in its training academy with emphasis on what the department and the courts will do to officers who turn sour.

More high-ranking officers now stay out on the streets to supervise, according to Dickson. The highest-ranking officer most street cops regularly saw while on patrol used to be a sergeant, he said. And for a while longer, he said, he will continue to run "sting" operations to catch officers on the take.

The rush to expand, Dickson said, seems to have led to a willingness to overlook past behavior in background checks that at other times would have been judged unacceptable. Now, he said, not only are polygraph and psychological examinations given to weed out those prone to violence and moral turpitude, but also psychologists "sit down and evaluate recruits one on one."

The department also now is able to draw from applicants who live anywhere in Florida instead of just the city, which accounts for about one-quarter of Dade County's population. At the rank-and-file's initiative, all police employees now are subject to drug-use tests without warning. All but six passed last year.

Sgt. Robert Webb, a 32-year veteran whose son is a Miami policeman, predicts that the scandals' ultimate result will be good. "There won't be anymore of that 'You're a brother, and I'm not going to tell on you,' " he said. "That's the way it was when I came on. Now there's no code of secrecy . . . . "