In a statement, the ministry said the boy was freed after he and his legal guardian signed a pledge.
“They signed a written pledge that the teen will not engage in behavior that could endanger his life and the life of others again,” it said.
“The notification was solely intended to warn the boy about potential consequences for his own safety, as well as to safeguard the overall safety of motorists and pedestrians,” the statement said.
The boy courted controversy when a film showing him dancing to the 1990s hit song “Macarena” at a traffic intersection became a sensation on social media.
Police said the teenager was taken in for questioning because he had shown “improper public behavior” and disrupted traffic.