An Australian court has approved a controversial parental request to allow a 5-year-old child, born male but described as intersex in media reports, to undergo gender reassignment surgery and identify as female.

(Photo: Reuters/Stringer)Lulu, a transgender girl, reads a book in her room at her home in Buenos Aires July 25, 2013. Lulu, a six-year-old Argentine child who was listed as a boy at birth, has been granted new identification papers by the Buenos Aires provincial government listing her as a girl. According to her mother Gabriela, Lulu chose the gender as soon as she first learned to speak. Gabriela said her child, named Manuel at birth, insisted on being called Lulu since she was just four years old, local media reported. Argentina in 2012 put in place liberal rules on changing gender, allowing people to alter their gender on official documents without first having to receive a psychiatric diagnosis or surgery. Picture taken on July 25, 2013.

BBC News reported that the child is known only as Carla, and identifies as a girl despite lacking female sex organs.

The Family Court was reportedly told that Carla was born with “female-appearing genitalia” and exhibited “stereotypically female” behavior, such as never wanting to be referred to as a male, and preferring “female toys, clothes and activities.”

A surgery will now be performed to remove the gonads from inside the child’s body. Medical experts reportedly testified in court that the surgery would remove the risk for the child developing tumours, and suggested that the surgery should take place before puberty.

(Photo: Reuters/Elijah Nouvelage) A young boy waves a rainbow flag while watching the San Francisco gay pride parade two days after the U.S. Supreme Court’s landmark decision that legalized same-sex marriage throughout the country in San Francisco, California, June 28, 2015.

Family Court Judge Colin Forrest said in his decision, according to the BBC, “I consider the proposed medical treatment ‘therapeutic’ as being necessary to appropriately and proportionately treat a genetic bodily malfunction that, untreated, poses real and not insubstantial risks to the child’s physical and emotional health.”

Even some intersex campaigners have questioned the ruling, however, with one advocate, named Morgan Carpenter, arguing that children need to be older to make important decisions about their identity.

“Gender assignment is always appropriate,” Carpenter told BBC. “What is not appropriate is surgically enforced gender assignment.”

Controversial stories of children being allowed to chose their gender have been reported on several occasions this past year.

In June The Christian Post reported that according to the Australian newspaper The Daily Telegraph, the NSW Department of Education revealed that the child is the youngest person in the country to be in the process of transitioning genders for eventual gender reassignment.