Montgomery County police, equipped with battering rams, crowbars and search warrants, arrested 21 persons late Tuesday and early yesterday in cracking what they termed a massive county-wide drug ring that stretched from the posh Promenade apartments in Bethesda to a racing car engine manufacturing shop in Rockville.

Four more persons were arrested late yesterday and police were searching for 17 others.

The raids culminated a sweeping six-month investigation by federal agents and local authorities into big-time trafficking in narcotics, much of which was marijuana grown in clandestine cannabis fields of the rural South and passed through dealers at fashionable addresses in Potomac and Bethesda before finally being sold on the streets of the nation's capital and the suburbs.

Police said they seized more than $160,000 worth of drugs, seven handguns, and a machine gun in 13 raids in Bethesda, Gaithersburg, Rockville and Silver Spring. They estimated the drug distributors sold $250,000 worth of cocaine and marijuana each month.

More than 100 county police officers, aided by D.C. police and federal Drug Enforcement Administration agents, seized 11 ounces of cocaine, valued at $27,500 on the streets, eight pounds of "standard" marijuana, valued at $3,200, and 25 pounds of "sensimilian" marijuana, a high-quality pot with a smoother, less harsh taste, police said. Also seized were about 10,000 methaqualone tablets, valued at $68,272.

Maj. Odus W. Sweat Jr., chief of the county's Investigative Services Bureau, called the drug ring "the largest scale operation that Montgomery County has ever cracked."

DEA special agent David Westrate characterized the ring as "a mid-level" group of distributors. "It's not street-corner stuff. It's distribution. It will put a big dent in the traffic in that county and the other affected areas."

The 21 persons first arrested included a 20-year-old Maryland beauty pageant contestant and the owner of Quicksilver Racengines Inc.

The investigation began when an undercover police officer in Montgomery bought some unspecified drugs from a 16-year-old Gaithersburg youth last July. From that sale, Sweat said, "the investigation went upwards, until we got to the top people in the ring."

The greatest number of arrests occurred in five apartments at the Promenade, a luxury complex with two towers on Pooks Hill Road, just inside the Beltway. Eight persons listed their addresses at the Promenade.

Police fanned out into 13 teams for the raids, which began about 9 p.m. Tuesday. Lt. Daniel W. King of the special investigative division said seven locations, mostly homes and apartments, were raided simultaneously, followed by two more locations hit simultaneously.

Police also raided two businesses during the night: the American Literary Sytems Inc. an encyclopedia and book sales company on Rockville Pike in Bethesda, and Quicksilver Racengines.

Cpl. Phil Caswell, the police department's spokesman, said he accompanied officers on the raid at Quicksilver on Gude Drive in Rockville. Officers there first pried open the door with a crowbar, he said, then sent in a dog trained to sniff out narcotics.

The police also had tripped the shop's alarm system, and soon the shop owner, identified as 33-year-old Warren Shamlian of Gaithersburg, arrived and found himself arrested. Police searched the engine shop and all other locations until early yesterday morning.

The first 21 arrested:

Harold Lee Nickell, 37; Joe Silvestri, 42; Laura Powell, 21; Howard Wolfe, 33; Allison Smith, 22; Joel F. Palmore, 32; Gary Jaffe, 31, and Michael Scheffries, 34, all of the Promenade apartments; Martin Santiago, 30, of Silver Spring; Warren Shamlian, 33, of Gaithersburg; Gary Smith, 35, of Bethesda; Cecilia Silva, 20, a 1980 Miss Maryland contestant, of Gaithersburg; Mark Eddy, 32, of Potomac; Lee Ogilby, 31, of Rockville; Jorge Barrenechea, 30, of Silver Spring; John Giblin, 22, of Gaithersburg; Gene Hayes, 20, of Gaithersburg; Michael Jones, 22, of Gaithersburg; Fran Mednick, 23, of Rockville, and Brian Swartz, 31, of Gaithersburg. An unidentified 16-year-old Gaithersburg youth was also arrested.

Arrested later yesterday:

James W. Smith, 30, of an unknown address; Gary Marcel Wolfe, 29, of Takoma Park; William James Gregg, 38, of Silver Spring, and Lance David Brashears, 22, of Mount Airy, Md.