One student stabbed another to death during a fight Tuesday in a courtyard at their suburban high school, authorities said.

School officials identified the victim as 17-year-old sophomore Juan Carlos Rivera.

Police did not identify the attacker, who was taken into custody immediately after the stabbing at Coral Gables Senior High School.

School Superintendent Alberto Carvalho said a fight happened sometime after 9 a.m. as students moved from first- to second-period classes. He could not say what the two students were arguing about or how many others saw the stabbing.

No information was released about the student who died. Miami-area television stations flew helicopters over the school and broadcast footage of a body covered in a sheet, lying in a pool of blood in the courtyard.

"Our collective hearts go out to the family of the victim," said Carvalho, who called it a "catastrophic loss."

"It's difficult, not impossible, to prevent a single, random act of violence," he said.

The school, in an affluent suburb southwest of downtown Miami, has 3,300 students on a 26-acre campus.

Student Felix Cedeno said he was on his way to the restroom when he saw a fight between two other students. One pulled out what looked like a switchblade or a box cutter and stabbed the other three times, he said.

"I saw the guy bleeding, I saw a guy in pain holding his chest and as soon as he fell to the ground I ran over to help him as soon as I could," Cedeno told the CBS 4 TV station.

In the hours after the stabbing, frantic parents gathered near the football field outside the school, which remained on lockdown. Students were encouraged to remain throughout the day, though they could leave if their parents picked them up.

The superintendent said lunch and water were provided in classrooms, and psychologists trained in crisis management were dispatched to the school to talk to staff and students.

All the students who weren't picked up by their parents left campus around 2:30, the end of the school day.

Miami-Dade school officials left a state Board of Education meeting upon hearing of the attack.

"This is the kind of incident that shouldn't happen anywhere in our community, and certainly shouldn't happen in our schools," state Education Commissioner Eric Smith said.