LARGO — The video of a vicious school bus beating in Gulfport has been broadcast endlessly nationwide over the last several weeks, but on Thursday one man wearing a black robe sat down to watch it for the first time.

Afterward, Pinellas-Pasco Circuit Judge Raymond Gross said: "It is shocking. It's a terrible display. All of us should be horrified." He called it "hideous" and said the beating was "horrific and despicable and frankly, it's cowardly."

The three teens who brutally beat a 13-year-old on the bus each pleaded guilty to aggravated battery, and one pleaded guilty to robbery, in juvenile court Thursday.

Gross followed recommendations from the Department of Juvenile Justice and sentenced all three 15-year-olds to "indefinite probation" with many conditions, including electronic monitoring, community service and random urine screenings. If any of the three ever are assigned to the same school as the victim, they must transfer out.

The sentence brings to a close a case that has prompted waves of controversy and punditry. Some in the news media focused on racial aspects of the case — the attackers are black, the victim is white — but authorities have said from the start there was no evidence the incident was racially motivated.

Another source of controversy was the Department of Juvenile Justice's recommendation for a sentence of probation, which many said was too lenient. Gross imposed probation, but it's a stricter form than originally proposed and it will not be lifted until the youths show they have made progress with school and their behavior.

Like other forms of probation, the youths can get in more trouble — including being locked up — if they get arrested or otherwise break the rules.

That said, the longtime juvenile judge was clear in telling all three 15-year-olds how lucky they were to have wound up in juvenile court instead of adult court.

Gross said prosecutors could have charged them as adults. He told one of the defendants, who is short and skinny, that the brutal punishment they inflicted "would probably be very little" compared to the abuse he would likely have suffered in a prison filled with adult men.

Gross held his fingers a millimeter apart and told the teen he had been that close to going to adult court.

The teens wrote letters of apology to the victim and apologized in court. Family members of each said they were shocked and troubled by the video, and they apologized, too.

Patricia Yankey, the victim's grandmother, was not in court but said afterward, "I just hope these kids learn. I just hope they realize what they have done to my grandson and how brutal it was."

The 13-year-old victim in the case was attending summer school at Lealman Intermediate School when two teens approached him on July 9 and one asked him to buy marijuana, authorities said. He said no and told a teacher.

While riding the school bus home, the boy sat behind the bus driver. The two teens were on the bus behind him.

At 20th Avenue S and 51st Street, the two teens — plus one other — attacked the 13-year-old, kicking him and stomping on him more than 20 times and breaking a bone in his hand or arm.

The beating was captured by a surveillance camera on the bus. The beating itself lasts about 30 seconds, but Gross and others in court watched more footage than has previously been available, including how the defendants approached the victim and taunted him.

One of the most troubling things, Gross said, was seeing that during the 30-minute bus ride, "they had time to cool down and it's very, very unfortunate that as opposed to cooling down, the rage level seemed to rise."

Earlier this month, the Department of Juvenile Justice recommended nine months probation for two of the youths. By Thursday, the department's recommendations had significantly changed, with input from the department's secretary.

Instead of a program called "court-supervised probation," they recommended a stricter form known as DJJ probation. Instead of nine months, they recommended the probation last indefinitely. They asked for 60 days of electronic monitoring — rare in such juvenile cases.

Assistant Public Defender Theresa Fifield-Wilcox raised the issue of whether the intense publicity had nudged the department to toughen its recommendations. She noted that at a previous hearing "the media was here that day and people were outraged with court-supervised probation."

Another assistant public defender, Tanya Alexander, said the handling of the case could be likened to an intervention.

"As egregious as it is," she said, "hopefully this is a wakeup call."