It could be military school for Madonna’s wild-child son – after he was snapped brandishing a booze bottle and his father flipped out.

A source says Madonna’s ex, “Sherlock Holmes” director Guy Ritchie, hit the roof when the pop star posted a photo on social media of their 13-year-old son Rocco holding a gin bottle next to friends holding vodka bottles.

“Guy thinks Rocco is completely out of control, but Madonna was at her wits’ end over how to rein him in,” disclosed an insider.

Meanwhile, Madonna knew that her good friend Rosie O’Donnell had some problems with her kids, so the source says she called Rosie for advice.

Rosie told Madonna that she’d sent her eldest, 18-year-old son Parker, to Valley Forge Military Academy for high school, and it was the smartest move she’d ever made, according to the source.

“Rosie said she was reluctant at first to send her son to such a strict boarding school, but Parker went from being sullen and belligerent to respectful and motivated in no time,” the source added.

“Madonna told Guy that Rosie suggested sending Rocco to military school, and he’s all for it. He’s fed up with Madonna’s lackadaisical parenting style and wants Rocco to have more structure.”