(CNN) -- A boy labeled the youngest detainee in Bahrain's prison system has been released pending trial, one of his lawyers said Tuesday.
The boy, Ali Hasan, was arrested on May 14 and accused of participating in an "illegal gathering" with about a dozen others, according to the Bahrain International Affairs Authority, the Persian Gulf kingdom's information office.
Authorities accuse him of burning tires at a roadblock.
Human rights groups say he is 11 years old. Authorities say he is 12.
Defense attorney Mohsin Al-Alawi said he recently visited Hasan and the boy told him that he didn't take part in an "illegal gathering." The boy sobbed, said he is tired and wanted to go home, Al-Alawi said Monday.
Human rights groups had been demanding his release and say he was arrested as the country continues to crack down on anti-government protesters.
Another attorney, Shahzalan Khamees, said Tuesday the boy was released Monday without bail or restrictions, on the promise that he would appear to face trial on June 20.
"Since he was detained, he has one phrase that does not change: 'I want to go home.' Now he is home with his parents and siblings," Khamees said.
The lawyer hopes the case will be dismissed, he said.
"He is a child, and under international law children cannot be tried. They can make a mistake, but they cannot be legally tried for their actions," Khamees said.
"The police record states that they saw a bag of garbage in the street and blamed him for using it to block the street," he said.
Authorities should be "more than satisfied" with the time Hasan has spent in jail "and the damage they have caused to the boy by imprisoning him," Khamees said.
Bahrain needs to treat children better, he added: "These are just children. They should be allowed to move like birds from one area to the next without fear of being trapped."
Authorities said Monday that Hasan was "receiving social care and tutoring at the (detention) center. He completed his last exam of the sixth grade level on Thursday."
The Bahrain Rehabilitation and Anti-Violence Organization, an Ireland-based rights group, said Monday that there are a "growing number of children detained for investigation in security cases."
The Bahrain Center for Human Rights also accused the government of targeting children under age 15 in its crackdown.
The rights group said Hasan is the youngest detainee in Bahrain's prison system. The government did not immediately respond to the allegation.
Bahrain has been heavily criticized by rights groups for its crackdown on anti-government protests that began February 14, 2011, in the country -- spurred by popular uprisings in Tunisia and Egypt.
But the protests failed to gain the traction of other Arab Spring uprisings after a crackdown in February and then again in mid-March of last year by Bahraini authorities -- backed by troops from Saudi Arabia and the United Arab Emirates.
Demonstrators and Bahraini authorities have continued to clash, with the opposition accusing the government of being heavy-handed in its crackdown on protests.
In November, Bahrain's Independent Commission of Inquiry issued a report highly critical of the crackdown.
The commission, set up by the king, concluded that police had used excessive force and torture during last year's crackdown. The report recommended reforms to the country's laws and better training of its security forces.
CNN's Saad Abedine contributed to this report.