Updated

Two 13-year-old boys accused of slapping girls' bottoms and poking or cupping girls' breasts at school apologized on Monday as a judge dismissed charges against the two, ending a six-month case that drew national attention.

The charges triggered a debate over whether such behavior in school should be considered criminal.

Four girls listed as victims by the prosecutors had asked the judge to drop the charges against Cory Mashburn and Ryan Cornelison.

Yamhill County Judge John Collins did so on Monday, saying it was in the "interest of justice."

A number of young girls were in the courtroom during the hearing. They included at least some of the four who asked that the charges be dropped, attorneys said.

During the brief hearing, the two boys faced the girls and apologized.

"I never intended to hurt you in any way," Mashburn said.

Cornelison told the girls: "I hope we can still be friends."

The News-Register newspaper of McMinnville reported that a "civil compromise" reached by prosecutors and the defense called for both boys to apologize, to pay each of the four girls $250 and to complete a "boundaries education" program.

Prosecutors and defense attorneys said they could not comment on the newspaper report or release details of the settlement because they are confidential.

Pressure has been building on prosecutors to drop the charges, with critics saying they had blown the matter out of proportion and were overzealous.

The boys, apparently inspired by the movie "Jackass," were accused in police reports of swatting girls on the bottom in a school corridor, grabbing girls' breasts on at least two occasions, teaming up to "dry hump" girls, poking girls' breasts and engaging in what's known as "party boy" dancing mimicking sexual intercourse.

They were originally charged with felony and misdemeanor sex abuse charges in February. Amid growing public opposition to sending the boys to prison and putting them on a sex offenders' registry, prosecutors dropped the felony sex abuse charges and added misdemeanor harassment charges, then later dropped all sex abuse charges, leaving only the harassment counts.

The judge dismissed the final charges following negotiations between prosecutors and the defense, and discussions with the four girls about whether they wanted the case dismissed.