Depending on who you ask, there will either be one less doll to play with or one less spy device in kids' rooms.

Germany's Federal Network Agency, or Bundesnetzagentur, said on Friday it was prohibiting retailers from selling My Friend Cayla, which garnered controversy last year over built-in technology that experts said allowed it to effectively spy on children. The government forbids illicit radio transmission equipment in toys.

"Objects that conceal transmittable cameras or microphones and thus pass on data unintentionally endanger the privacy of the people. This also applies to children's toys," Jochen Homann, Bundesnetzagentur president, said in a statement. "The doll Cayla is forbidden in Germany. This is at the same time about the protection of society's most vulnerable."

The regulator also said that people who have already bought one of the dolls should destroy it. Authorities added that they would review other interactive toys in the same vein as Cayla to determine their legality.

"Toys as espionage devices are dangerous," the regulator said. "Without the knowledge of their parents, the conversations of children can be received and relayed."

Toy draws legal complaints

The talking doll comes equipped with a bluetooth device that allows it to "listen" and "talk" with children. It is also capable of accessing the internet. However, authorities warned that the doll is vulnerable to hackers who can reveal owners' personal data.

German regulators want this off the shelves and out of kids' rooms

A flaw in Cayla's software was first revealed in January 2015, and experts say the bug has yet to be fixed by the toy's manufacturer, Genesis Toys. The company has not yet commented on the German government's announcement.

Both EU and US consumer watchdogs had already filed complaints about the toy, which they said was capable of subjecting children to ongoing surveillance.

The statement from the German government comes after a student at the University of Saarland raised concerns over the legality of the toy. According to the student, someone with the toy could be easily spied on by someone with a listening device.

The agency said it was not planning any legal actions against the parents who bought the toy.