Tristin Tavares Bernard, 18, was arrested Friday and charged with attempted murder

A Florida man is accused of beating a three-year-old girl with a brick and leaving her to die inside a trash bin, according to authorities.

Miami Gardens police on Friday charged Tristan Tavares Bernard, 18, with attempted second-degree murder, aggravated battery, and aggravated child abuse amounting to torture in connection with the Thursday night attack.

They say the girl, who family members say was named 'Catora,' was being babysat by Bernard's mother at her home in the 20100 block of Northwest 27th Court in Miami Gardens.

Bernard, who is not related to the child, but is said to be a close friend of her family, was at the address as well.

The girl's uncle told CBS4 Bernard has a history of mental instability.

'Nobody in this world would expect that he would do that, like [he] never show that sign that he would do that,' the victim's uncle, who did not want to give his name, told multiple local news reporters.

Police say Bernard stuffed the three-year-old girl in a trash bin after he beat her with a brick Thursday evening

The attack took place in the 20100 block of NW 27th Court in Miami Gardens

Neighbors said they went outside Thursday evening after hearing screams from the home of Bernard's mother.

Jose Sotamayor told WSVN he saw Bernard hitting the three-year-old girl with a brick after stuffing her in a large, plastic trash bin a block and a half away from the home.

The child's uncle said Bernard's mother wasn't immediately aware the three-year-old had left her house.

'When [Bernard's mother] turned back, she don't see [the three-year-old], so she said, "Catora! Catora!''' the child's uncle told WSVN. 'So when she doesn't see Catora, she doesn't see [Bernard] either. That's when she got suspicious, like, "Where's Tristin? Where's Tristin?"'

Sotmayor said Bernard fled the scene when he approached him. He found the three-year-old was badly injured inside the bin.

The child was taken to Joe DiMaggio Children's Hospital where she remained in critical condition Friday afternoon

'She was bleeding on the side of her head. Thank God I was able to save her life,' the neighbor said.

The girl was taken to Joe DiMaggio Children’s Hospital for surgery and was in critical condition Friday afternoon, according to WSVN.

Family members told reporters the child suffered severe injuries to her head. Police say Bernard told detectives he hit the girl because she left the house and wouldn't listen to him. Investigators say they recovered Bernard's clothes, which were covered in blood after the incident.

Bernard remained jailed Friday on $160,000 bond.