JEFFERSONVILLE, Ga. (AP) — A Georgia teenager taken from his parents after they allowed him to smoke marijuana to treat frequent seizures was allowed to return home Monday.

The 15-year-old boy suffers daily epileptic seizures, according to a brief filed in juvenile court by the American Civil Liberties Union of Georgia. The teen had tried prescription medication and legal medical cannabis oil, but those didn’t work.

Then, his mother and stepfather, Suzeanna and Matthew Brill, allowed him to smoke marijuana. That stopped his seizures for 71 days, said their lawyer, Catherine Bernard.

But when authorities found out, they came to the family’s home in Macon on April 19 and said they had to stop. The parents agreed to comply, and the teen had a serious seizure the next day that required hospitalization, Bernard told The Associated Press on Monday.

The teen was placed in state custody, and his mother and stepfather were charged with reckless conduct after authorities said the couple put their son in danger by giving him marijuana.

“Our position, of course, is that the state endangered him by abruptly terminating treatment that was working for him,” Bernard said.

Marijuana is not legal in Georgia for recreational or medical use, but the possession of low-THC cannabis oil is legal for the treatment of a specific list of medical conditions, including epilepsy.

At a hearing Monday in Twiggs County Juvenile Court, the state came out first and said the teen should be returned to his parents, Bernard said. It was clear that he was being cared for by parents who had his best interest at heart, she said.

A protective order was outlined in court, but it hasn’t been finalized yet, Bernard said, adding that Suzeanna Brill has agreed to follow instructions from her son’s doctors.

The teen and his family had a celebratory pizza lunch after the hearing before heading home, Bernard said.

“We are very happy with the outcome today,” she said.