The mayor of a small town north of Montreal says the municipality has obtained an injunction to force a group of Hasidic Jews to leave the residence where they've been staying.

Sainte-Agathe-des-Monts Mayor Denis Chalifoux says the town sought the ruling in Quebec Superior Court because the group is using the residence as a place of worship in violation of local bylaws.

Chalifoux alleges that several dozen people come to stay temporarily on the property each summer, where he says they hold loud gatherings that create a nuisance for the neighbours.

He says the city has sent numerous letters, warnings and citations since 2015 to try to resolve the conflict with no success.

While the injunction originally required the group to leave by today, Chalifoux said the city has extended the deadline and the community has agreed to leave by July 26.

Representatives for the group could not be reached for comment.