The administrative court in Melun went against the recommendations of the magistrate's office which on Friday suggested the creche be removed as it was a religious symbol and more than just a tradition.
Town mayor Gerard Millet hailed the decision, saying the nativity scene was not an act of provocation.
"It is a cultural element which has its place among Christmas decorations," he said.
The decision comes after a court in the southern French city of Montpellier on Friday backed the far-right mayor of nearby Beziers and allowed his town hall to keep its nativity scene.
The beloved Christian tradition of putting up an exhibition of the birth of Jesus Christ angers strict secularists in the country which in 1905 signed into law the separation between the church and the state.
Authorities in Vendee, the traditional heartland of French Catholicism, are currently appealing a recent court ruling that ordered the removal of nativity scenes in the headquarters of the regional assembly.
"It is a pity for the republic and a pity for secularism," said Gerard.
Docquin of the local Federation of Free Thinkers that has been fighting since 2005 to stop the mayor of Melun allowing the scene to be installed at Christmas time.