"Parents cannot demand that their children are constantly taught in a co-educational [environment], the city administrative court ruled, The Local.de reported Wednesday.
Separation of the sexes for sports lessons is a common practice in many German schools.
The classes are segregated in Berlin because of differences in boys' and girls' physical development, officials said.
The parents of two daughters filed the complaint, arguing children have the right to coeducational instruction.
The girls' mother said the court's ruling missed the point of the complaint.
"For us ... children should not be excluded from groups just because of their sex," she said.
The practice only confirms so-called gender roles, the mother said.
Couple mistakenly served bag of cash at McDonald's drive-thru
Benedict Cumberbatch's dramatic reading of R. Kelly lyrics is just what you need