Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

A 7-year-old Miami boy was taken into custody last week after police say he attacked a teacher at school by pulling her hair and repeatedly punching her in the back.

It was the child's second tantrum in less than three months, his family said. But this time, a Miami-Dade Schools Police officer went an extra step: The boy was handcuffed, loaded into a cruiser and taken to a psychiatric evaluation as permitted under state law. Part of the incident was caught on video and continued to be shared Friday on Facebook.

"I know my kid did wrong, and he will be punished for what he did," the boy's father, Rolando Fuentes, told NBC Miami. "But what the police officer did afterward, this is out of hand. Unbelievable."

A 7-year-old Miami boy was placed in handcuffs after he allegedly attacked a teacher. Juan Alvarado

While the image of young children in cuffs can stir outrage and has also led to lawsuits in recent years, this latest occurrence is raising questions about what the appropriate response is when a minor acts out.

Law enforcement officers often deal with making quick decisions with little information and under dangerous circumstances, said Martha Lenderman, a former mental health administrator who helped write the Baker Act, Florida's law that allows for people to be hospitalized for psychiatric evaluation.

"That's a pretty tough thing," she added.

The 7-year-old in the Miami case is not being identified because he is a juvenile. According to a school police report, the child was upset at his teacher at the Coral Way K-8 Center for being told not to play with his food.

Related: Why handcuff a student with a disability?

The boy "attacked the teacher by repeatedly punching her on the back" while she was in the hallways talking to another teacher about his behavior, the report said.

The teacher restrained the boy, but he continued to hit her, and the two ended up falling to the ground, the school report said.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Surveillance cameras captured the incident, although the video was not immediately made public. The report said the boy's parents were contacted, and while his mother didn't want him to be treated under the Baker Act, his father agreed. (He told NBC Miami he had to consent or his son would be arrested.)

The unidentified teacher also said she wanted to press charges, according to the report.

Rolando Fuentes' 7-year-old son was placed in handcuffs after he allegedly attacked a teacher. NBC Miami

The boy was previously suspended in November for 10 days for his bad temper, his mother said.

Miami-Dade Schools Police said in a statement that such an incident is rare, but the boy's violent outburst required his handcuffing in order to prevent him "from bringing further harm to others or himself. The manner in which he was transported to the receiving facility was done in accordance with Standard Operating Procedures."

Lenderman said that while handcuffing a child may have "horrifying optics," police officers have to be motivated to ensure that both the child and those around him are safe.

However, Florida's law allowing for someone to be involuntarily hospitalized for up to 72 hours adds an extra layer of judgment.

Related: Police apologize for handcuffing 7-year-old in Michigan

The Miami boy's family denied he had a "mental disorder" and said he was actually the victim of bullying.

"Sometimes officers responding to the scene don't know all the information," Lenderman said. "If what the teacher is saying is corroborated with video, then it appears to be a fairly not unreasonable decision on the part of the officer" to handcuff the child.

Being handcuffed and placed into a police car "can be very scary for any person, including a young child," added Dr. Lisa Spector, who specializes in developmental-behavioral pediatrics at Nemours Children's Hospital in Florida.

Any child who is bullied or acts out toward others can benefit from a psychological evaluation, she added, and believes schools need to have services available where adults can identify trauma in children early on and help them cope with their problems, potentially preventing violent behavior.

Otherwise, "it can set up a lot of distrust and additional stress between the teacher and the child," Spector said.

Lenderman predicts the rates of young children being admitted for psychological evaluation will likely increase with more reported cases of bullying, suicide and schools heightened with concerns about safety.

"People still feel shame because there can be a stigma with mental illness, but that needs to change," she added.

A 2017 report on the Baker Act through the University of South Florida found that 32,000 children were examined under the law in fiscal year 2015-16 — a nearly 50 percent increase statewide from five years earlier.

The Miami boy was released hours after being brought to a children's hospital. His family couldn't immediately be reached for comment Monday.

Fuentes, the boy's father, said he just can't believe his son was treated in such a manner.

"There's something wrong in this case," he added.