After two “traumatizing” nights in jail, a 12-year-old girl arrested in connection with a gun bust inside her family home in Toronto has been released from custody.

The child, who cannot be identified under the Youth Criminal Justice Act, was released to her grandmother Thursday morning, on $500 bail.

She was arrested Tuesday night along with her mother, several brothers and other youths after police uncovered two machine pistols and an overcapacity drum magazine inside a home in northeast Toronto.

A family member told CTV Toronto the child had nothing to do with the weapons and that her arrest and subsequent time in custody has been “traumatizing.”

Det. Sgt. Gerald Heaney said the 12-year-old girl was charged along with everyone else living in the home because the firearm was accessible to everyone in the residence.

As part of her bail conditions, the girl is not allowed to contact her mother or some of her brothers, and she must live with her grandmother.

She is scheduled to appear in court again on Jan. 5.

Police raided the home near Victoria Park Ave. and Finch Ave. after a robbery and carjacking earlier this month. Police said they believed a 17-year-old suspect was living in the house.

In total, three adults -- including the girl’s 39-year-old mother -- faced firearms offences and possession of stolen property. Six young people were also charged with similar offences.

With a report from CTV Toronto