A court in Eger, N Hungary, ruled on Thursday that the authorities illegally segregated Roma children from the mainstream in the high school in Gyongyospata, which is run by the local council.
The case was brought to court by Chance for Children Foundation.
The court also decided that the children in question had been placed in a lower stream of education than their non-Roma peers.
The ruling, which can be appealed, also obliges the school to cease the practice of segregating Roma from non-Roma.
The local council is run by officials from the radical nationalist Jobbik party.