A 13-year-old girl in Utah had her ponytail cut off, was jailed for 30 days and was forced to undergo a strip search at the hands of juvenile justice officials, all because she allegedly helped a friend cut another little girl's hair.

"I was at McDonald's with my other friend," the girl, Kaytlen Lopan, told Raw Story. "She ripped her pants on the swing set, so we asked if we could have some scissors. Then we walked across the street to buy some scissors and we cut the strings off her pants."

"And then she was going to try to cut the net in the [McDonald's] play area, but she couldn't because it was like wire with plastic," Lopan explained. "But then she wouldn't tell me what she was going to do, and she called a little girl over and cut some of her hair off, like just a tiny little piece. I didn't know what to do, so I helped her hide the hair. Then I called my mom to come get me."

Two weeks later, she was visited at school by a police officer, who said the little girl's parents were pressing assault charges.

After examining Lopan's charges, Utah's 7th District Juvenile Judge Scott Johansen ordered her mother, Valerie Bruno, to "whack that ponytail off," according to an audio recording taken from inside the courtroom. He also ordered Lopan to spend 30 days in a detention center, pay a $350 fine and serve 276 community work hours, but reduced those hours by 150 because Bruno was willing to cut her daughter's hair in front of the victim's parents.

"I didn't want my mom to cut my hair, but I didn't want to work all those hours," Lopan said.

Now the girl's mother, Valerie Bruno, has filed an official complaint against the judge. In doing so, she's attracted local media attention to the case. Speaking to Raw Story, Bruno insisted her daughter didn't actually participate in the hair-cutting, but got the worst of the punishment anyway -- including a 30-day term in the Castle Country Youth Center, where she was strip searched upon admittance.

"Now, she won't even sleep by herself," Bruno said. "She's very upset and she [often] cries."

Judge Johansen sentenced the other little girl to have her hair cut as well, but she was allowed to get it cut at a local salon and was not removed from parental custody.

Bruno told Raw Story she believes her daughter got such a severe punishment because a probation officer merged the hair-cutting case with another charge relating to a series of prank phone calls Lopan and a friend had made over the course of several months to another girl in Colorado.

"Kaytlen did not cut her hair," Bruno said. "She did not do it. The probation officer talked her into saying she did because she was 'guilty by association.' She told her, even if you were just there, you're just as guilty."

But she and her mother didn't realize what else her sentence entailed. Upon arriving at the Castle Country Youth Center in Price, Utah, Lopan said she was strip searched and promptly confined. "I was scared," she explained. "I just didn't think I was going to go there. I was never away from my mom for very long."

Bruno added: "The other thing the judge said to my daughter was, if he sees her in this courtroom ever again, then she will not be leaving with her mom. She will be going home with someone else because she is no longer welcome in this community."

While none of the judge's actions appear to be illegal -- Utah state law gives juvenile courts wide authority to use creative sentencing -- it's not the first time Judge Johansen has sparked controversy.

He ordered a local mom in 2007 to either enroll her children in public schools or lose custody, even though she had placed them in a home schooling curriculum. The mother, Denise Mafi, eventually fled the state to avoid losing her children over what she called a paperwork error by the school district. Judge Johansen was also publicly reprimanded in 1997 for physically slapping a 16-year-old boy across the face.

Judge Johansen was appointed to the bench in 1992 by then-Gov. Norm Bangerter (R). He previously served as a city attorney and chair of the state's Board of Juvenile Court Judges.

Utah juvenile justice officials told Raw Story they could not comment on specific cases that involve minors.

This video is from KSL News 5 in Utah, broadcast Friday, June 22, 2012.