Nine members of a New York Hasidic Jewish community have been arrested and charged over a secret tunnel that connected to a historic synagogue.

They fought police after city officials and leaders of the Chabad-Lubavitch headquarters came to close the tunnel.

The men are charged with criminal mischief, reckless endangerment and obstructing governmental administration.

A spokesperson for the Chabad called them a “group of extremist students”.

The tunnels were built under a prominent street in Brooklyn, where the Chabad-Lubavitch headquarters are located. The building is one of the most significant Jewish sites in the city.

City inspectors were called to the Chabad on Monday to conduct an emergency structural inspection. There were looming concerns that the illegal tunnel could have caused damage to the famous property.

A brawl broke out after police found a group of young men blocking efforts to inspect and fill the tunnel with cement. Some of the men then broke through the wall of the prayer space. Those acts led to the arrests.

Rabbi Yehuda Krinsky, the chairman of the Chabad, thanked police for their efforts and said the community was “pained by the vandalism of a group of young agitators”.

“These odious actions will be investigated, and the sanctity of the synagogue will be restored,” he said.

It is unclear who built the tunnel, how they did it and what their motivations were. It appears the tunnel connects to at least one other building on the street in Brooklyn.

One local told the New York Times that the men sought to build the tunnel to hasten the expansion of the synagogue.

Some members who have attended services and functions at the Chabad have reportedly complained about overcrowding in the building in recent years.

Videos and photos from inside the building on Monday, however, showed a small group of mostly young men trying to block the tunnel from being filled with cement.

Others were seen pulling wood panels from the walls of the sanctuary and using benches to block police in the videos and images. One of the videos reviewed by the BBC showed an officer using a spray to break up a growing skirmish.

The building, which sees thousands of visitors each year, was formerly the home of the leader of the Orthodox Jewish movement – Rabbi Menachem Mendel Schneerson.

The rabbi is credited with leading the Chabad-Lubavitch and revitalising the Hasidic religious community after it was devastated in the Holocaust. He died in 1994, but his headquarters remains a well-known centre for the Jewish religion.

While the Chabad-Lubavitcher movement is sprawling and its mission is to welcome Jews at all levels of religious practice, it also has key divisions within the larger movement. Those divisions appeared to have spilled over in the tunnel dispute at 770 Eastern Parkway this month.

A deeply religious fringe group within the Chabad believes Rabbi Schneerson is the Jewish Messiah – an idea the mainstream movement rejects. That disagreement is reportedly an element in the tunnel altercation.

The building has been closed as inspection of the tunnels has continued.