One defendant cracked his knuckles. Another's knees bounced with unchecked nervousness. Still another sat ramrod straight, looking as though the next few minutes could be his last.

None sat next to or acknowledged each other, though they are bound together as participants in a nascent Main Line ring that aimed its marijuana sales at students of elite schools around the region.

"It seems," Montgomery County Court Judge Steven T. O'Neill observed at one point Wednesday, "like weed got a lot of people in trouble."

In a packed courtroom, four of the drug-ring defendants pleaded guilty and agreed to testify against their codefendants.

Five others, including alleged ringleaders Neil K. Scott and Timothy C. Brooks, had their cases put on the trial list, which gives them time to continue exploring their options, O'Neill told a courtroom packed with defendants, attorneys, and family members. The cases of two other ring members, both under 18, have been heard in Juvenile Court.

In April, the District Attorney's Office arrested 11 suspects who officials said were part of an operation launched in December 2013.

In a text message that investigators seized, Brooks allegedly called the initiative "My main line take over project," a now-notorious nickname for the ring.

Authorities called Scott, 25, of Haverford, and Brooks, 19, of Villanova, the ringleaders who dispersed the drugs, mainly marijuana, and recruited the others to sell to students from Lower Merion, Harriton, Conestoga, and Radnor High Schools; the Haverford School; and Haverford, Gettysburg, and Lafayette Colleges.

Those who pleaded Wednesday bought drugs from Scott and Brooks and sold them to others, according to court documents.

Reid J. Cohen, 19, of Englewood Cliffs, N.J., and Garrett M. Johnson, 19, of Jericho, N.Y., pleaded guilty to misdemeanor charges of receipt in commerce of marijuana, possession of marijuana, and possession of drug paraphernalia.

Both attended Haverford College at the time of their arrests and could receive up to five years each in prison on the charges.

"The district attorney came up with an appropriate offer," said Cohen's lawyer, Emmett Madden.

Domenic V. Curcio, 29, of Philadelphia, pleaded guilty to felony criminal conspiracy with intent to deliver marijuana and faces a 21/2- to five-year sentence. Curcio, who was on probation for an unrelated offense when he was arrested, was brought to the courtroom from the Montgomery County Correctional Facility and returned there afterward.

Willow L. Orr, 22, of Philadelphia, pleaded guilty to one count of criminal conspiracy to possess drugs with intent to deliver and also faces a jail term of 21/2 to five years.

In exchange for pleading guilty to some counts, the four will have other charges dropped if they meet conditions, including testifying against codefendants - particularly Scott and Brooks - if trials occur. The deals did not include reduced sentences.

O'Neill, who is in charge of the county's drug court, spoke to some defendants about their own use of marijuana, asking if they had any in their system and ordering that they not use any drugs.

Montgomery County Special Assistant District Attorney Tonya Lupinacci said sentencing for the four would not occur until after the cases of Brooks and Scott are resolved.

She said the four cooperated with authorities from the start, and that the case offered a lesson for any young person who might want to engage in similar behavior.

"I know we've initiated several conversations in homes all around America between parents and their children about deciding what is right and what is wrong," Lupinacci said. "These defendants made the wrong decision and they will pay for it."