The congregation at Touro Synagogue prevailed Monday in a bitter legal fight that threatened its existence when a federal judge granted them control of the country’s oldest synagogue and not the building’s New York-based founding organization.

In a ruling Monday in Providence, U.S. District Judge Jack McConnell gave Congregation Jeshuat Israel in Newport control over the 250-year-old Touro Synagogue despite objections from New York’s Shearith Israel.

McConnell also ruled that the Newport congregation is the owner of a pair of ceremonial bells, valued at $7.4 million, and may do what it chooses with them. The ruling follows a four-year legal battle that began when members of the Touro Synagogue in Newport tried to sell those bells and New York’s Congregation Shearith Israel attempted to block the deal, citing an 18th century agreement that named it a trustee.

“The central issue here is the legacy of some of the earliest Jewish settlers in North America, who desired to make Newport a permanent haven for public Jewish worship,” McConnell wrote in his 106-page decision that removed Shearith Israel as a trustee from the synagogue.