An 11-year-old Ontario boy who was taken from his parents' custody after they refused to continue his chemotherapy treatments will be returned to his family.

The boy’s parents, who were in a Hamilton courtroom Tuesday, reached an agreement with the Children's Aid Society that their son will go home at the end of his current bout of chemotherapy.

His family has also agreed to bring the boy, who suffers from an aggressive form of leukemia, back for further treatments.

The family has also been granted special funding to seek second and third opinions on his prognosis.

"Now the question is is whether the treatment that's proposed is in the best interests for this child," Marlys Edwardh, the family's lawyer said. "And we'll deal with that separately."

The family will be back in court in June 16 to resolve their continued appeal of CAS jurisdiction.

"Right now we had to play by their fiddle and that's fine," the boy's father said outside court.

The boy's father and stepmother, who can't be identified to protect the boy's identity, lost custody to the CAS when they tried to refuse a second round of chemotherapy treatments, as the boy had requested. Instead they planned to seek alternative treatments.

But medical officials insisted that he needed the treatment, saying the boy had a good chance of recovery and that he wasn't capable of making his own life and death decisions.

The boy was diagnosed with acute lymphoblastic leukemia when he was seven and underwent a debilitating round of chemotherapy. The cancer went into remission but returned earlier this year.

He was told last week he'd have to undergo more chemo treatments but he refused.

With files from the Canadian Press